Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shapper
Constraint Violating Yak Guru
450 Posts |
Posted - 2009-08-03 : 16:53:05
|
| Hello,I was checking an example for creating tables and before each table creation I have the following:set ansi_nulls ongoset quoted_identifier ongocreate table dbo.Roles ( .... )I don't use this when creating my tables.Do I need it? If yes, why? |
|
|
johnconstraint
Starting Member
23 Posts |
Posted - 2009-08-04 : 12:25:27
|
| It depends on the SQL server database setup. If the database is setup with ANSI_NULLS ON and QUOTED_IDENTIFIER ON, I think you need not use them when creating tables.The ANSI standard states that if you are comparing two columns of data that have NULL value in them, then the comparison should fail and should not return the rows with NULL values, when you use the equals sign (=) and not equals (<>) operators. Setting ANSI NULL values to OFF alters the standard.Details on QUOTED_IDENTIFIERhttp://msdn.microsoft.com/en-us/library/ms174393.aspx |
 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
|
|
|
|
|