Including Comments in SQL Statements in MySQL

Q

How To Include Comments in SQL Statements in MySQL?

✍: FYIcenter.com

A

If you want to include comments in a SQL statement, you can first enter "--", then enter your comment until the end of the line. The tutorial exercise below shows you some good examples:

SELECT 'Hello world!' FROM DUAL; -- My first SQL statement! 

INSERT INTO links VALUES ('FYIcenter.com'); -- Top rated!

CREATE TABLE faq (
   id INTEGER, -- primary key
   title VARCHAR(80) -- FAQ title
);

 

Entering Character Strings in MySQL

Evaluating Expressions with SELECT Statements in MySQL

Introduction to SQL Basics in MySQL

⇑⇑ MySQL Database Tutorials

2018-04-12, 1539🔥, 0💬