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

what command is used to create a table by copying the
structure of another table including constraints ?

Answer Posted / a.jyothsna

I know copying the structure of one table but not the
constraints also:
create table newtablename as
select * from oldtablename;

with the above query total data will also be copied.
But to copy only the structure.

create table newtablename as
select * from oldtablename
where 1=2;

Is This Answer Correct ?    20 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a data definition language?

1027


What are the possible values that can be stored in a boolean data field?

947


What is localdb mssqllocaldb?

1017


Show code of a cursor for loop.

1000


What is pl/sql table? Why is it used?

977


what are the different type of sql's statements ? : Sql dba

872


What is a full join sql?

981


What is cost in sql execution plan?

903


how can you create an empty table from an existing table? : Sql dba

1077


What are two statement types in sql?

1031


What is constant in pl sql?

967


what is user defined functions? : Sql dba

975


How do we accept inputs from user during runtime?

990


What is the difference between truncate and drop statements?

1083


what is a trigger? : Sql dba

974