| | |
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 |





