September 21, 2010 at 8:49 am
I want to create a temporary table and use "script table as" as below:
CREATE TABLE #[TCallList001Local](
[CSINO] [nvarchar](20) NULL,
[TYPE] [nvarchar](15) NULL,
......
)
One co-worker recommend me that do not use [ ]. It will effect performance.
Is it true?
September 21, 2010 at 9:05 am
They aren't really necessary in this example, but won't affect performance, and never hurts to use them.
You need to put the # sign inside the bracket though.
The Redneck DBA
September 21, 2010 at 9:30 am
To answer questions of this nature, uese the SET STATISTICS TIME, IO ON and you can learn for yourself what the effects of with [ ] or without [ ] are.
SET STATISTICS TIME,IO ON
CREATE TABLE [#TCallList001Local](
[CSINO] [nvarchar](20) NULL,
[TYPE] [nvarchar](15) NULL)
SET STATISTICS TIME,IO OFF
DROP TABLE #TCallList001Local
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply