0

I am learning mysql client program.I was trying to understand client option -comments.I have seen document regarding this in mysql MySQL 5.6 Reference Manual. But I didn't get any code example to illustrate this option.Please tell me how to Enter this command in correct syntax.Also it would more clear to me if i get opportunity to see this example on any online mysql terminal.Thanks

1 Answer 1

2

MySQL comments are lines that begin with #, like Unix shells. It's as simple as that. Example:

# this is a comment describing the next line which select all data from the `users` table SELECT * from `users`; 

The -comments argument to the mysql command line client is used to tell it to send the comments to the server which is not done by default. These comments are later visible in the query logs and stored procedures (which is the simplest way to see it in action).

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks @Julie Pelletier.Nice example.However i don't see any -comments keyword in your example.please let me correct i misunderstand that:I think you mean that, Firstly I've to use the command 'mysql -comments' in terminal for configuring the server to accept comments which comes with sql statements from the client programs.After that, if i use your example then the comment will be also sent along with the SQL.Did i got it correct? thanks

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.