GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Database  >  SQL Server

 Print  |  
Question:  How will you copy the structure of a table without copying the data?



October 10, 2005 08:23:49 #5
 Ajay Sharma   Member Since: Visitor    Total Comments: N/A 

RE: How will you copy the structure of a table without...
 
I think this should be more appropriate: Create table as select * from where 1=2;Here only the structure of the old table is copied and all the constraints imposed on the old table are not copied in the new table.This you can check by writing on SQL PROMPTSQL > desc SQL> desc Thanks!
     

 

Back To Question