While using SQL Server Managemen开发者_StackOverflow社区t Studio, I generally do:
Query->Query Options->Advanced->SET NOCOUNT
Query->Query Options->Text->Enter 8000 in the lower right box
Can someone please tell me if there is anyway I could do this using sqlcmd
?
You have these switches for sqlcmd that affect width etc
- -w
- -Y
- -y
I don't know if this is exactly what you are trying to do, but to set data type in the column for example to varchar with maximum length 30:
sqlcmd -E -d dbname -Q "ALTER TABLE table_name
ALTER COLUMN column_name varchar(30) NOT NULL"
For database named 'dbname' on your local machine.
精彩评论