In the database window, right-click the source table. Select copy. Right-click the database window and select paste. Type a table name and select "Structure Only." Click OK and you have a new table with all the attributes of the old table. Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it if you have time.
Sorry, I was a little rushed when doing this... What I meant was..
I need a way to clone a table's schema programatically, either through a system stored procedure or some other means.
I have looked through the archives and have been unable to find a suitable way of doing so. I have also looked through the SQL books online to find an easy way of doing this and drawn blanks.
And I was rushed too and slightly confused. I can see that I gave an Access answer in a SQL forum. I apologize for that.
I know there is some info available explaining how to do what you want. I can't remember where to find it right now. If you don't already have an answer I'll try to find after I get to work - in about 8 hours. Need some sleep now. Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time. NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
SQL_DMO allows you to transfer objects, copy schemas, etc. SQL Server hooks into SQL-DMO using the SP_OA stored procedures. The following link explains how to use the SP_OA procedures and has several examples including "Transfer a Single Table Structure and Data."
INF: Examples of Sp_OA Procedure Use and SQ[tt]L[/tt]OLE.Transfer[/ignore] Object
Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time. NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.