February 21, 2006 at 12:43 pm
Hi,
In Oracle, it uses Create Table as Select...... to create an identical table with data loaded.
How T-SQL does for the same thing?
Thank you.
February 21, 2006 at 12:55 pm
this creates a temporary table #a:
select name
into #a
from sysobjects
select * from #a
February 21, 2006 at 8:33 pm
maybe you could try like this in your SP or query:
create table #temp(@field1 int,@field2 varchar(10))
insert into #temp
select a,b from tableFrom
select * from #a
then, when you're not using the table again,
drop table #a
February 21, 2006 at 10:02 pm
in T-SQL You can do it with the following syntax
select * into from
example
select * into mytable from sysobjects
February 21, 2006 at 10:03 pm
n T-SQL You can do it with the following syntax
select * into [new_table_name]from [table_name]
example
select * into mytable from sysobjects
You Store, I Manage
November 29, 2007 at 4:29 am
thanx yaar ur tip was awesome ...
i tried it .. n it worked
November 29, 2007 at 4:53 am
select * into new_table from old_table
November 29, 2007 at 11:55 pm
Hi,
you can make use of temporary table as follows:
select * into #TempTable from SourceTable
Regards,
Avaneesh.
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy