MySQL Programming Question:
Download Job Interview Questions and Answers PDF
How To Include Comments in SQL Statements?
Answer:
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 ('GlobalGuideLine.com'); -- Top rated!
CREATE TABLE faq (
id INTEGER, -- primary key
title VARCHAR(80) -- FAQ title
);
SELECT 'Hello world!' FROM DUAL; -- My first SQL statement!
INSERT INTO links VALUES ('GlobalGuideLine.com'); -- Top rated!
CREATE TABLE faq (
id INTEGER, -- primary key
title VARCHAR(80) -- FAQ title
);
Download MySQL Programming Interview Questions And Answers
PDF
Previous Question | Next Question |
How To Calculate Expressions with SQL Statements? | How To Include Character Strings in SQL statements? |