sqlserver material 4
What is Difference between Table Aliases and Column Aliases? Do they Affect Performance? Usually, when the name of the table or column is very long or complicated to write, aliases are used to refer them. e.g. SELECT VeryLongColumnName col1 FROM VeryLongTableName tab1 In the above example, col1 and tab1 are the column alias and table alias, respectively. They do not affect the performance at all. What is the difference between CHAR and VARCHAR Datatypes? VARCHARS are variable length strings with a specified maximum length. If a string is less than the maximum length, then it is stored verbatim without any extra characters, e.g. names and emails. CHARS are fixed-length strings with a specified set length. If a string is less than the set length, then it is padded with extra characters, e.g. phone number and zip codes. For instance, for a column which is declared as VARCHAR(30) and populated with the word ‘SQL Server,’ only 10 bytes will be stored in it. However, if we ha...