0
Does SQL Management Studio 2012 allow editing the SQL DDL (data definition language) code directly? If not, how can I view only the SQL code generated by the application?
0
Does SQL Management Studio 2012 allow editing the SQL DDL (data definition language) code directly? If not, how can I view only the SQL code generated by the application?
2
You can easily create the DDL script for any database object in SSMS 2012. Just right click on the object you want to have script for (in your case table), and select Script Table as -> CREATE To -> New Query Editor Window. You will get the table creation script in SSMS's Query Window.
Alternatively, you can use ApexSQL Script, as it will allow you to script not only the object you want, but it can include all the dependant objects in the final script. It is even possible to combine multiple SQL databases and extract SQL objects from multiple SQL databases at once. You can read more about this in the Create DDL and DML SQL scripts for specific SQL database objects only article. Output will be an .sql file which can be edited quickly with any text editor
Disclaimer: I'm working for ApexSQL as a Technical Support Engineer
2You'd use a usual Query Editor window to view and edit queries and such, so I'm unclear what you're trying to accomplish? What do you mean by "code generated by the application"? What exactly are you trying to view/edit? What have you tried already? Where are you getting stuck? – Ƭᴇcʜιᴇ007 – 2013-05-31T02:27:58.277
Tables definition code (DDL). It was in my queston, but some1 edited it, and removed "DDL" keyword. – apocalypse – 2013-05-31T17:50:08.127
DDL commands (Create, Drop, etc.) are just done in the standard Query Editor along with other SQL commands. Again though: What exactly are you trying to view/edit? What have you tried already? Where are you getting stuck? – Ƭᴇcʜιᴇ007 – 2013-05-31T18:32:24.670
I created a table. Now I want to modify this table using text editor, or at least I want to just view DDL code for that table. – apocalypse – 2013-05-31T18:41:03.643