Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Commenting

Status
Not open for further replies.

chrisgarvey

Technical User
Mar 27, 2003
64
GB
Hi I'm just starting to learn mysql for the first time.

I know in Oracle SQL*Plus you add comments to your code using the REM statement.

How can you add comments in mysql?

Cheers,

Chris.
 
#Comments are preceded by a hash

"If you always do what you've always done, you will always be where you've always been."
 
As well as using # for end-of-line comments, you can also use /* ... */ for embedded comments. For example:

[tt]SELECT userid[/tt] /* the user's id */[tt], username[/tt] # the user's name
[tt]FROM userstable[/tt]

-----
ALTER world DROP injustice, ADD peace;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top