简体   繁体   中英

scripting SQL table only from SQL Server Management Studio

How can I take a table with data in it to be executed? I tried to do it from Create Table but the data is missing I could only import coloumns.

在此处输入图片说明

在此处输入图片说明

there is no such an option in SSMS . You can just run this kind of simple SQL

SELECT * 
INTO [MyNewTable]
FROM [MyOldTable]

Right Click on Database -> Tasks-> Generate Script . If this is SMS 2008 then in Advanced option you have option for Schema | Schema and Data | Data only. Choose Schema and Data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM