Similarly, it is a good idea to use spaces to surround the equals operator, to use spaces before or after apostrophes, and to use a space after a comma. It is a good idea to use a new line for each separate query and to use a new line for each separate column after a comma. The liberal use of newlines can really help readability of an SQL query. Most experts recommend first writing keywords on a new line to the left and then the rest of the code to the right, like this: A good idea is to combine id with the name of a table, for example: id_employee. For the primary key column avoid the name id.Include the AS keyword for creating aliases, because this makes the code more readable.Use the same naming rules for aliases for columns or tables.Avoid giving the same name to both a table and a column.Avoid abbreviations, but, if you do use them, be sure that they will be understood.Don't start the name with an underscore.Use an underscore in a name only if necessary. (use only letters, numbers, and underscores). Avoid special characters in the name like $, &, *, etc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |