Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Databases Programming Interviews:BtrieveClipperData ModelingData StructuresDatabase AdministrationDatabase Administrator (DBA)Database AnalystDatabase DeveloperDB DevelopmentEDI/Data Integration ExpertFirebirdHierarchicalIBM DB2InformixJava DatabaseMariaDBMicrosoft Access DeveloperMongoDBMS SQL ServerMySQL ProgrammingNetworkNoSQLObject RelationalPostgrePostgreSQLProgressRDBMSRelationalSQLSQL AdministratorSQL and PL/SQLSQL Notification ServicesSQL server 2008SSRSStored ProcedureSybaseTeradata
Copyright © 2018. All Rights Reserved
MS SQL Server Interview Question:
How To Enter Comments in Transact-SQL Statements?
Submitted by: AdministratorThere are 2 ways to enter comments within Transact-SQL statements:
* Starting comments with two dashes "--": Everything between "--" and the end of the line is treated as a comment.
* Entering comments between "/*" and "*/": Everything between "/*" and "*/" is treated as a comment.
Here are some good examples of how to enter comments:
/* The following statement
creates a table
called ggl_links */
CREATE TABLE ggl_links (
id INTEGER PRIMARY KEY, -- the primary key
url VARCHAR(80) NOT NULL, -- address of the link
notes VARCHAR(1024),
counts INT, -- number of clicks
created DATETIME NOT NULL DEFAULT(getdate())
);
GO
-- Get rid of this table
DROP TABLE ggl_links;
GO
Submitted by: Administrator
* Starting comments with two dashes "--": Everything between "--" and the end of the line is treated as a comment.
* Entering comments between "/*" and "*/": Everything between "/*" and "*/" is treated as a comment.
Here are some good examples of how to enter comments:
/* The following statement
creates a table
called ggl_links */
CREATE TABLE ggl_links (
id INTEGER PRIMARY KEY, -- the primary key
url VARCHAR(80) NOT NULL, -- address of the link
notes VARCHAR(1024),
counts INT, -- number of clicks
created DATETIME NOT NULL DEFAULT(getdate())
);
GO
-- Get rid of this table
DROP TABLE ggl_links;
GO
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.