How to make script that make some things on SQL Server 2008? -


i need make things on sql server 2008 , need on file or script can take on computer has sql server 2008

i need this:

  1. to add field f1 (nvarchar) , f2 (bit) table mytable1

  2. and make new table mytable2

  3. to delete table3

how combine 1 script file ?

thanks in advance

you can try this, work in sql server management studio:

alter table dbo.mytable1   add f1 nvarchar(100)  alter table dbo.mytable1   add f2 bit  go  create table dbo.mytable2(... define columns here.......) go  drop table dbo.table3 go 

this uses go separator keyword ssms - it's not valid sql keyword (e.g. cannot run code using sql server client library).


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -