Alex Rivera | Logout

Is SQL syntax case sensitive?

Asked 2008-09-30T16:49:04.717
236

Is SQL case sensitive? I've used MySQL and SQL Server which both seem to be case insensitive. Is this always the case? Does the standard define case-sensitivity?

Edit
Report

2 Answers

25

This isn't strictly SQL language, but in SQL Server if your database collation is case-sensitive, then all table names are case-sensitive.

answered 2008-09-30T16:50:34.650
5

No. MySQL is not case sensitive, and neither is the SQL standard. It's just common practice to write the commands upper-case.

Now, if you are talking about table/column names, then yes they are, but not the commands themselves.

So

SELECT * FROM foo;

is the same as

select * from foo;

but not the same as

select * from FOO;
answered 2008-09-30T16:51:54.040

Your Answer