| | |
INSERT CLAUSE using SUB-QUERY
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
I'm trying to populate a table from a sub-query.
QUESTION:
I know you can do this in ORACLE but Is something like this possible in T-SQL.
I can also write something like this in SQL which achieves the same result but I will lose the datatype,
Any suggestions is greatly appreciated.
MS SQL Syntax (Toggle Plain Text)
CREATE TABLE test ( ID int ) INSERT INTO test VALUES (SELECT [Customer Id] FROM [Customers])
QUESTION:
I know you can do this in ORACLE but Is something like this possible in T-SQL.
I can also write something like this in SQL which achieves the same result but I will lose the datatype,
MS SQL Syntax (Toggle Plain Text)
SELECT [Customer Id] INTO test FROM [Customers]
Any suggestions is greatly appreciated.
Save White Tiger
![]() |
Similar Threads
- Problem with MySQL Query (Database Design)
- updating a database (ASP.NET)
- Controlling GridView with a ListBox(multible selections enabled) (ASP.NET)
- Trying to return query results (ColdFusion)
- help!! update mysql problem (MySQL)
- Access INSERT problem (MS Access and FileMaker Pro)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- ADO data control problem (Visual Basic 4 / 5 / 6)
Other Threads in the MS SQL Forum
- Previous Thread: sql*plus or pl/sql question
- Next Thread: Help with a stored procedure
| Thread Tools | Search this Thread |
Tag cloud for MS SQL
"last autogrowth business connectingtodatabaseinuse count cursor data database dateadd datepart day" dbsize deadlock delete_trigger getdate highperformancecomputing hpc hpcserver2008 ibm iis loop maximum microsoft ms mssql multiple multithreading news number permission query reporting result server services sets source sql sqlserver sqlserver2005 supercomputing tables uniqueid update view weekday





