There is no direct command, for example
MODIFY dbname.schemaname.spname
You have 3 options that use TSQL, in addition to the traditional GUI method using SSMS
EXEC sp_helptext dbname.schemaname.spname'; SELECT OBJECT_DEFINITION (OBJECT_ID(dbname.schemaname.spname')); SELECT definition FROM sys.sql_modules WHERE object_id = (OBJECT_ID(dbname.schemaname.spname'));
Unfortunately, all of these options will result in loss of formatting.
Here you are trying to use two technologies.
- SQL and SQLSyntax
- SQL Management Tool
It is probably not possible to use TSQL to manage Studio Management, as you see fit. I'm afraid cut and paste is your only option.
Rajah
source share