SET QUOTED_IDENTIFIER in sql server
Hi,
In this article we will see a use of SET QUOTED_IDENTIFIER options in sql server. This options specifies the setting for usage of double quotation. When this is on, double quotation mark is used as part of the SQL Server identifier (object name). This can be useful in situations in which identifiers are also SQL Server reserved words.
In this article we will see a use of SET QUOTED_IDENTIFIER options in sql server. This options specifies the setting for usage of double quotation. When this is on, double quotation mark is used as part of the SQL Server identifier (object name). This can be useful in situations in which identifiers are also SQL Server reserved words.
Check my previous articles
Send mail by using store procedure
Dynamic query in sql server
initial in upper case
Example of cursor
delete duplicate records from table
Send mail by using store procedure
Dynamic query in sql server
initial in upper case
Example of cursor
delete duplicate records from table
For example ::
1) Try to create a table with name "select"
CREATE TABLE SELECT (id INT)
2) Try to create a proc with name "delete"
CREATE PROCEDURE DELETE
AS
BEGIN
PRINT'Impossible'
END
1) Try to create a table with name "select"
CREATE TABLE SELECT (id INT)
2) Try to create a proc with name "delete"
CREATE PROCEDURE DELETE
AS
BEGIN
PRINT'Impossible'
END
*)Now check the effect of "SET QUOTED_IDENTIFIER On" in sql server
1) we will again try to create table with name select by using below statement.
SET QUOTED_IDENTIFIER On
CREATE TABLE "SELECT"(id INT)
2)we will also try to create procedure with name delete by using below statement.
SET QUOTED_IDENTIFIER On
CREATE PROCEDURE "DELETE"
AS
BEGIN
PRINT 'possible'
END
1) we will again try to create table with name select by using below statement.
SET QUOTED_IDENTIFIER On
CREATE TABLE "SELECT"(id INT)
2)we will also try to create procedure with name delete by using below statement.
SET QUOTED_IDENTIFIER On
CREATE PROCEDURE "DELETE"
AS
BEGIN
PRINT 'possible'
END
awesome
ReplyDelete