Showing posts with label test1. Show all posts
Showing posts with label test1. Show all posts

Thursday, March 22, 2012

ALTER table queries

In Oracle, alter statements with modify clause can be given for more than one query ? Is it possible in SQL Server ?

Eg :-

ALTER TABLE test1
MODIFY col1 VARCHAR2(1024)
MODIFY col2 VARCHAR2(256)
MODIFY col3 VARCHAR2(256)

Please give the equivalent for the above in SQL Server . Can all this exists in a single query in SQL Server ?MS-SQL supports the SQL-92 standard. Under the standard, you can add multiple columns in a single operation, but you can only change one existing column at a time.

It is possible to configure SQL 2000 to allow changes to multiple columns at once, but it is NOT supported at all. I would strongly advise that you break your changes down so that they meet the SQL-92 standard instead of trying to work around the standard.

-PatP|||Hi,

Thanks for your prompt reply.

Thanks,
Sam