Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2010-03-10 : 16:49:04
|
| Could anyone help me how to generate Table Script like belowthrough T-SQL Statementif exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[aaVersionControl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [dbo].[aaVersionControl]GOCREATE TABLE [dbo].[aaVersionControl] ( [Item] [char] (64) COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL , [ItemType] [char] (10) COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL CONSTRAINT [IX_aaVersionControl] UNIQUE CLUSTERED ( [Item], [VersionNo], [MinorVersionNo] ) WITH FILLFACTOR = 90 ON [PRIMARY] ) ON [PRIMARY]GO |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-03-10 : 17:39:18
|
why can't you use SQL Server Management Studio to do it ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2010-03-10 : 18:03:14
|
we are trying to call as a batch filequote: Originally posted by khtan why can't you use SQL Server Management Studio to do it ? KH[spoiler]Time is always against us[/spoiler]
|
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-03-10 : 19:51:18
|
you can also save the script as a file via the SSMS KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|