From the course: MySQL Essential Training
Unlock this course with a free trial
Join today to access over 23,700 courses taught by industry experts.
Comments - MySQL Tutorial
From the course: MySQL Essential Training
Comments
- [Bill] Hi, I am Bill Weinman. Current versions of MySQL now support a form of the standard SQL comments. Though it's not exactly correct and older versions have not always supported at all. A standard SQL comment looks like this. You have two dashes and then the comment, and you'll notice that MySQL gives us this little red X here because this does not count as a comment in MySQL. In MySQL, it is required that you put a space after the two dashes that introduce a standard SQL comment. Now it's a comment and it is recognized by MySQL. MySQL also supports comments introduced by a hash mark or a pound sign, and you'll notice that that works just fine in MySQL, even without the space, although the space is always a good idea. This is not a standard SQL comment and in other systems, this will not count as a comment at all and will give a syntax error. Modern SQL in the standard also supports multi-line comments like this. This is a standard SQL multi-line comment. It's borrowed from the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.