MySQL Case Sensitive

SQL keywords are not case-sensitive that means 'SELECT' is same as 'select'. But the database name, table name, field name may be case-sensitive depending on the operating system. In general, Unix or Linux platforms are case-sensitive, whereas Windows platforms aren't.

For Example:

SELECT emp_name, salary FROM employees;

The above statement can also be written, as follow:

select emp_name, salary from employees;

Tip: It is recommended to write the SQL keywords in uppercase, to differentiate it from other text inside a SQL statement for a better understanding.

SQL Comments

A comment is simply a text that is ignored by the database engine. Comments can be used to provide a quick hint about the SQL statement.

SQL support single-line as well as multi-line comments. To write a single-line comment start the line with two consecutive hyphens (--). For example:

-- Select all the employees
SELECT * FROM employees;

However to write multi-line comments, start the comment with a forward slash followed by an asterisk (/*) and end the comment with an asterisk followed by a forward slash (*/), like this:

/* Select all the employees whose salary is greater than 5000 */
SELECT * FROM employees WHERE salary > 5000;