Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@leo-ZJQlmh • Nov 12, 2010
create table newtable_name like database_name.old_table_name;
insert into newtable_name selcet * from database_name.old_table_name;
This will copy your previous table to new table. Happy computing. -
@sahithi-oJZaYj • Nov 12, 2010
create table new-table-name (column-list) as select (column-list) from existing-table-name;
What's this then? -
@saandeep-sreerambatla-hWHU1M • Nov 12, 2010
-
@sahithi-oJZaYj • Nov 12, 2010
This is same as the query I have given.English-ScaredIn Oracle,
Create table temp as select * from old table. -- will this not do?
create table new-table-name (column-list) as select (column-list) from existing-table-name;
In your query, temp is the new-table-name and old table refers to the existing-table-name. I had specified the column-list to select particular columns and you used * to select all the columns, Isn't it?
This will definitely works. -
@bohar-wQr9Oe • Nov 13, 2010
select * into table_new from table_old
this query work in sqlserver,but i have no idea that about, this will work in oracle,mysql or not -
@4m4n-jQmegc • Nov 13, 2010
Suppose u have table employee having cols eno, ename, salary and adress, now for making exact copy of that table of name emp2 the following query can be used
create table emp2(eno int, ename varchar(50), salary int, address varchar(50)) select eno , ename , salary , address from employee;
(tested)