← Back to Kurakani

SQL Server Table with data

Original Post

Hello sajha guruharu, I have a table. I want to generate the create skript with data without right-clicking on the table. What can be the skript to generate the SQL Server Table with data? Please help. Thanks in advance. Last edited: 28-Jul-19 01:21 PM

phone
Jul 25, 2019 4:21 PM · 16,991 views
5 Replies
neo-reactive-poet Jul 25, 2019 9:55 PM
SELECT * FROM TABLENAME That will give you data. lol
smtzac Jul 27, 2019 8:29 AM
Right click on the Database, go to Generate skript, inside 'advanced' ( I believe) it says 'schema' and 'Schema and Data' select 'Schema and Data' one.Or SELECT * INTO newtable (it will create a new table)FROM tableName (you want to create a table using this table data) Hope it helps. Last edited: 27-Jul-19 08:35 AM
phone Jul 28, 2019 8:41 AM
Hello smtzac, Thank you for your reply. Is there a query to generate a query as an alternative by going into the database>tasks>generate skript.......? Thank you. Last edited: 28-Jul-19 01:23 PM
smtzac Jul 28, 2019 9:16 AM
No, I don't believe so. Last edited: 28-Jul-19 09:22 AM
Jhilke_Bro Jul 29, 2019 11:00 AM
Copy the result set from the following query and patch with INSERT INTO dbo.DestinationTable(ColumnA,ColumnB) SELECT 'SELECT '+ ''+ColumnA+''+','+''+ColumnB+''+' UNION ALL' FROM dbo.TableName
Login to join the conversation.

You might be interested in...

Recent Classifieds View all
Upcoming Events View all
Service Providers View all
Ask Sajha AI Assistant