Reputation: 117030
While using SQL Server Management 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
?
Upvotes: 0
Views: 1756
Reputation: 499
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.
Upvotes: 1