Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How can I create a table from another table without copying
any values from the old table?

Answers were Sorted based on User's Feedback



How can I create a table from another table without copying any values from the old table?..

Answer / anji

create table table_name as ( select * from old_table where 1=2)

from this query we can create a new table structure from old
table structure with out data

Is This Answer Correct ?    26 Yes 1 No

How can I create a table from another table without copying any values from the old table?..

Answer / suresh babu

create table new_tn as select * from source_tn where 1=2;

This query will create a new table,which take structure of
the source table with out values.

Is This Answer Correct ?    6 Yes 0 No

How can I create a table from another table without copying any values from the old table?..

Answer / tejas wajge

create table emp as select * from project where rownum <1;

Is This Answer Correct ?    4 Yes 0 No

How can I create a table from another table without copying any values from the old table?..

Answer / srinivas

create table emp1
as
select * from scott.emp where rownum=0

Is This Answer Correct ?    3 Yes 0 No

How can I create a table from another table without copying any values from the old table?..

Answer / atul verma

SELECT *
INTO emp1
from scott.emp where rownum=0

Is This Answer Correct ?    0 Yes 0 No

How can I create a table from another table without copying any values from the old table?..

Answer / ram

In oracle

Create table newtablename as select * from oldtablename
where 1=2
(any false condition if condition true it copies data from
table it applicable for both oracle & sqlserver)

In Sql server

select * into newtablename from oldtablename where 1=2

Is This Answer Correct ?    0 Yes 0 No

How can I create a table from another table without copying any values from the old table?..

Answer / sunil panghal

create table sunil as select *from hr.employees

Is This Answer Correct ?    0 Yes 2 No

How can I create a table from another table without copying any values from the old table?..

Answer / shabana

Use the describe command to display the table structure
then use the create table command and copy the table
structure in your command.

Is This Answer Correct ?    1 Yes 11 No

Post New Answer

More SQL PLSQL Interview Questions

What is pl sql package?

0 Answers  


.  have a tablle like this: cust acc ----------- a 1 b 2 b 3 c 4 c 5 c 6 I Want below o/p: cust acc --------------- a 1 b 2|3 c 4|5|6 Please any one can you have any ideas share me. I have urgent requirement. CUST         ACC a            dv b            fg b            bh c            mk c            cl c            so result:- A  B   c dv fg mk    bh cl       so

3 Answers  


In a table only one column how to update rows

5 Answers   Microsoft,


I have a small PL/SQL Block assume in this way begin select * from emp where empno=100; exception when others then <Some Messages> when no_data_found then <Some Messages> when too_many_rows then <Some Messages> end; The question which he asked was whether this block will get executed normally or it will throw error ? If errored out then what is the reason for the error ? Could anybody please help me ? Regards Nakul Venkataraman

3 Answers   Satyam,


When is a declare statement required?

0 Answers  


what is a database lock ? : Sql dba

0 Answers  


Is vs as in pl sql?

0 Answers  


What does sign mean sql?

0 Answers  


what is csv? : Sql dba

0 Answers  


What is inner join in sql?

0 Answers  


How to get list of all tables from a database?

0 Answers  


Can you join a table to itself?

0 Answers  


Categories