How to copy table structure only from a SQL Query ? Tip #69


Recently , one of my friends shared that some interviewer asked him a question “How to copy table structure only from a  SQL Query?”


Below is simplest query to copy structure only of a table into another table.

Into #tmpStudentStructure
FROM tblStudentSource
WHERE 1= 0

in the above query we want to copy structure of tblStudentSource.

see below snap which help you to understand it more


I hope this might help you if some asked you this question.

Thanks & Enjoy!!!


Leave a Reply

Your email address will not be published. Required fields are marked *