dwain.c (11/18/2013)
Abu Dina (11/18/2013)
Ah! Then you need to be introduced to the INTO Clause 😉A couple of caveats to using this technique:
- All columns created will default to allow NULL values.
Not sure I understand this, just tried the below:
CREATE TABLE SCCTest (Col1 INT NOT NULL, Col2 INT NULL)
INSERT INTO SCCTest(Col1, Col2)
VALUES (1, 2)
SELECT * INTO #SCCTest FROM SCCTest
INSERT INTO #SCCTest (Col1, Col2)
VALUES (NULL, 3)
Msg 515, Level 16, State 2, Line 1
Cannot insert the value NULL into column 'Col1', table 'tempdb.dbo.#SCCTest____________________________________________________________________________________________________________0000000007C0'; column does not allow nulls. INSERT fails.
The statement has been terminated.
---------------------------------------------------------
It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
David Edwards - Media lens[/url]
Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
Howard Zinn