SQL comments

Before you start diving into the world of SQL, just a short note about commenting your SQL code. In SQL, there are a number of ways to comment your code, of which the most popular are /* */ and #, both of which are seen in PHP. Of the two, # is more popular - like PHP, it comments to the end of the line.

Author's Note: I personally find # good for SQL because I never use it in PHP scripts - it makes the distinct between complex SQL queries and PHP code that little bit more obvious. Choose what fits you best.

 

Next chapter: Interacting with MySQL >>

Previous chapter: SQL

Jump to:

 

Home: Table of Contents

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar