Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating an exact replica of another table in SQL 7.0

Status
Not open for further replies.

sandra64

Programmer
Jun 26, 2002
28
GB
Hi

In ingres sql you can type the command:-

create table tt2 as
select * from tt1

table tt2 will then be created with exactly the same properties etc as tt1.

Is there an equivalent in SQL version 7.0.

also in ingres you can do the following command :-

insert into tt2
select * from tt1

which will put all the rows from tt1 into tt2 (if the tables are identical)

is there an equivalent to this....

Not to worry if there isn't, I'll just have to do it the long winded way, I just used to find those two very useful.

cheers
Sandra

 
Your second scenario is exactly the same in SQL as ingres.
Code:
insert into tt2 select * from tt1

The SQL equivalent to
Code:
create table tt2 as select * from tt1
would be
Code:
select * into tt2 from tt1


--Angel [rainbow]
-----------------------------------
Every time I lose my mind, I wonder
if it's really worth finding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top