I need to copy data from on premise sql server to sql azure, but as sql azure does not support select into, so I need to first create table on sql azure and then call insert into. Here, I do not know source table to migrate, so how can I create new table's schema definition using existing ones?
Asked
Active
Viewed 129 times
1
-
You can use the Generate Scripts tool in SSMS https://msdn.microsoft.com/en-us/library/hh245282.aspx – supergrady Apr 04 '16 at 23:14
-
I do not want to do manually, script should be created via code. – Varun Gupta Apr 04 '16 at 23:18
-
What is the use case that you're trying to meet here? – Ellesedil Apr 04 '16 at 23:28
-
2http://stackoverflow.com/questions/21547/in-sql-server-how-do-i-generate-a-create-table-statement-for-a-given-table – artm Apr 04 '16 at 23:54
-
Select into is supported by sql dB v12, give a shot. – Satya_MSFT Apr 05 '16 at 05:25
-
Select into is supported in V12 – TheGameiswar Apr 05 '16 at 06:44
-
My server is V12, it is not working. When I do select @@version, it gives me "Microsoft SQL Azure (RTM) - 12.0.2000.8 Mar 30 2016 13:04:43 Copyright (c) Microsoft Corporation" – Varun Gupta Apr 05 '16 at 17:14