--client±í; use [db] go IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[client]') AND name = N'id') DROP INDEX [id] ON [dbo].[client] WITH ( ONLINE = OFF ) if not exists(select name from syscolumns where id=object_id('client') and name='photo') alter table [client] add [photo] [image] NULL alter table [client] alter column [id] [nvarchar] (50) NULL alter table [client] alter column [name1] [nvarchar] (50) NULL alter table [client] alter column [name2] [nvarchar] (50) NULL alter table [client] alter column [phone1] [nvarchar] (50) NULL alter table [client] alter column [phone2] [nvarchar] (50) NULL alter table [client] alter column [qq1] [nvarchar] (50) NULL alter table [client] alter column [qq2] [nvarchar] (50) NULL alter table [client] alter column [addr1] [nvarchar] (50) NULL alter table [client] alter column [addr2] [nvarchar] (50) NULL alter table [client] alter column [occupation1] [nvarchar] (50) NULL alter table [client] alter column [occupation2] [nvarchar] (50) NULL alter table [client] alter column [birthday1] [nvarchar] (50) NULL alter table [client] alter column [birthday2] [nvarchar] (50) NULL alter table [client] alter column [time3] [nvarchar] (50) NULL alter table [client] alter column [area] [nvarchar] (50) NULL alter table [client] alter column [area2] [nvarchar] (50) NULL alter table [client] alter column [check1] [nvarchar] (50) NULL alter table [client] alter column [check2] [nvarchar] (50) NULL alter table [client] alter column [check3] [nvarchar] (50) NULL alter table [client] alter column [sex] [nvarchar] (50) NULL alter table [client] alter column [zodiac] [nvarchar] (50) NULL CREATE UNIQUE NONCLUSTERED INDEX [id] ON [dbo].[client] ( [id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] go --version±í; if not exists(select name from syscolumns where id=object_id('version') and name='curdate') alter table [version] add [curdate] [nvarchar](50) NULL else alter table [version] alter column [curdate] [nvarchar](50) NULL if not exists(select name from syscolumns where id=object_id('version') and name='cardlength') alter table [version] add [cardlength] [nvarchar](50) NULL else alter table [version] alter column [cardlength] [nvarchar](50) NULL alter table [version] alter column [version] [nvarchar](50) NULL alter table [version] alter column [check1] [nvarchar](50) NULL alter table [version] alter column [check2] [nvarchar](50) NULL alter table [version] alter column [check3] [nvarchar](50) NULL alter table [version] alter column [check4] [nvarchar](50) NULL alter table [version] alter column [edit1] [nvarchar](50) NULL alter table [version] alter column [edit2] [nvarchar](50) NULL alter table [version] alter column [edit3] [nvarchar](50) NULL alter table [version] alter column [edit4] [nvarchar](50) NULL alter table [version] alter column [info1] [nvarchar](50) NULL alter table [version] alter column [info2] [nvarchar](50) NULL alter table [version] alter column [info3] [nvarchar](50) NULL alter table [version] alter column [info4] [nvarchar](50) NULL alter table [version] alter column [info5] [nvarchar](50) NULL alter table [version] alter column [bak1] [nvarchar](50) NULL alter table [version] alter column [bak2] [nvarchar](50) NULL alter table [version] alter column [bak3] [nvarchar](50) NULL alter table [version] alter column [bak4] [nvarchar](50) NULL alter table [version] alter column [bak5] [nvarchar](50) NULL alter table [version] alter column [bak6] [nvarchar](50) NULL alter table [version] alter column [baktime] [nvarchar](50) NULL alter table [version] alter column [bakserver1] [nvarchar](50) NULL alter table [version] alter column [bakserver2] [nvarchar](50) NULL alter table [version] alter column [bakserver3] [nvarchar](50) NULL alter table [version] alter column [bakserver4] [nvarchar](50) NULL alter table [version] alter column [bakserver5] [nvarchar](50) NULL alter table [version] alter column [msgaccount] [nvarchar](50) NULL alter table [version] alter column [msgpsw] [nvarchar](50) NULL alter table [version] alter column [msgused] [nvarchar](50) NULL alter table [version] alter column [msgbalance] [nvarchar](50) NULL alter table [version] alter column [msgcheck1] [nvarchar](50) NULL alter table [version] alter column [msgcheck2] [nvarchar](50) NULL alter table [version] alter column [msgdays1] [nvarchar](50) NULL alter table [version] alter column [msgdays2] [nvarchar](50) NULL alter table [version] alter column [msgcontent1] [nvarchar](max) NULL alter table [version] alter column [msgcontent2] [nvarchar](max) NULL alter table [version] alter column [remarks] [nvarchar](max) NULL alter table [version] alter column [rate] [nvarchar](50) NULL alter table [version] alter column [msgcheck3] [nvarchar](50) NULL alter table [version] alter column [msgcontent3] [nvarchar](max) NULL alter table [version] alter column [salarycheck1] [nvarchar](50) NULL alter table [version] alter column [salarycheck2] [nvarchar](50) NULL alter table [version] alter column [msgcheck4] [nvarchar](50) NULL alter table [version] alter column [msgtime] [nvarchar](50) NULL alter table [version] alter column [msgphones] [nvarchar](max) NULL alter table [version] alter column [info6] [nvarchar](50) NULL alter table [version] alter column [msgcompanyname] [nvarchar](50) NULL alter table [version] alter column [msgphones2] [nvarchar](max) NULL alter table [version] alter column [msgsendtype] [nvarchar](50) NULL alter table [version] alter column [msgcontent5] [nvarchar](max) NULL alter table [version] alter column [msgcontent6] [nvarchar](max) NULL alter table [version] alter column [rate2] [nvarchar](50) NULL-- alter table [version] alter column [salarycheck3] [nvarchar](50) NULL alter table [version] alter column [salarycheck4] [nvarchar](50) NULL alter table [version] alter column [msgcheck5] [nvarchar](50) NULL alter table [version] alter column [msgcheck6] [nvarchar](50) NULL alter table [version] alter column [setcheck1] [nvarchar](50) NULL alter table [version] alter column [setcheck2] [nvarchar](50) NULL alter table [version] alter column [setcheck3] [nvarchar](50) NULL alter table [version] alter column [setcheck4] [nvarchar](50) NULL alter table [version] alter column [setcheck5] [nvarchar](50) NULL alter table [version] alter column [setcheck10] [nvarchar](50) NULL alter table [version] alter column [printer1] [nvarchar](50) NULL alter table [version] alter column [printer2] [nvarchar](50) NULL alter table [version] alter column [printer3] [nvarchar](50) NULL alter table [version] alter column [setprintstyle] [nvarchar](50) NULL alter table [version] alter column [setprintstyle2] [nvarchar](50) NULL alter table [version] alter column [uploadcheck1] [nvarchar](50) NULL alter table [version] alter column [uploadcheck2] [nvarchar](50) NULL alter table [version] alter column [uploadcheck3] [nvarchar](50) NULL alter table [version] alter column [uploadcheck4] [nvarchar](50) NULL alter table [version] alter column [bak11] [nvarchar](50) NULL alter table [version] alter column [bak22] [nvarchar](50) NULL alter table [version] alter column [bak33] [nvarchar](50) NULL alter table [version] alter column [bak44] [nvarchar](50) NULL alter table [version] alter column [ziptype1] [nvarchar](50) NULL alter table [version] alter column [ziptype2] [nvarchar](50) NULL alter table [version] alter column [ziptype3] [nvarchar](50) NULL alter table [version] alter column [ziptype4] [nvarchar](50) NULL alter table [version] alter column [limitcount1] [nvarchar](50) NULL alter table [version] alter column [limitcount2] [nvarchar](50) NULL alter table [version] alter column [limitcount3] [nvarchar](50) NULL alter table [version] alter column [salaryset] [nvarchar](max) NULL alter table [version] alter column [setcheck11] [nvarchar](50) NULL alter table [version] alter column [setcheck12] [nvarchar](50) NULL alter table [version] alter column [setprintstyle3] [nvarchar](50) NULL alter table [version] alter column [msgcheck7] [nvarchar](50) NULL alter table [version] alter column [msgcheck8] [nvarchar](50) NULL alter table [version] alter column [msgcheck9] [nvarchar](50) NULL alter table [version] alter column [msgcheck10] [nvarchar](50) NULL alter table [version] alter column [msgcontent8] [nvarchar](max) NULL alter table [version] alter column [msgcontent9] [nvarchar](max) NULL alter table [version] alter column [msgcontent10] [nvarchar](max) NULL alter table [version] alter column [setcheck13] [nvarchar](50) NULL alter table [version] alter column [time1] [nvarchar](50) NULL alter table [version] alter column [time2] [nvarchar](50) NULL alter table [version] alter column [time3] [nvarchar](50) NULL alter table [version] alter column [setcheck14] [nvarchar](50) NULL alter table [version] alter column [setcheck15] [nvarchar](50) NULL alter table [version] alter column [msgcheck11] [nvarchar](50) NULL alter table [version] alter column [msgcheck12] [nvarchar](50) NULL alter table [version] alter column [msgcheck13] [nvarchar](50) NULL alter table [version] alter column [msgcheck14] [nvarchar](50) NULL alter table [version] alter column [msgcontent11] [nvarchar](max) NULL alter table [version] alter column [msgcontent12] [nvarchar](max) NULL alter table [version] alter column [msgcontent13] [nvarchar](max) NULL alter table [version] alter column [msgcontent14] [nvarchar](max) NULL alter table [version] alter column [setcheck6] [nvarchar](50) NULL alter table [version] alter column [msgcheck15] [nvarchar](50) NULL alter table [version] alter column [msgcontent15] [nvarchar](max) NULL alter table [version] alter column [logdays] [nvarchar](50) NULL alter table [version] alter column [setcheck17] [nvarchar](50) NULL alter table [version] alter column [setcheck18] [nvarchar](50) NULL alter table [version] alter column [setcheck19] [nvarchar](50) NULL alter table [version] alter column [uploadrule] [nvarchar](max) NULL alter table [version] alter column [setcheck20] [nvarchar](50) NULL alter table [version] alter column [cardnum] [nvarchar](50) NULL alter table [version] alter column [cardscale] [nvarchar](500) NULL alter table [version] alter column [info7] [nvarchar](120) NULL alter table [version] alter column [setcheck21] [nvarchar](50) NULL alter table [version] alter column [msgcheck16] [nvarchar](50) NULL alter table [version] alter column [hospitalmsgcheck1] [nvarchar](50) NULL alter table [version] alter column [hospitalmsgcheck2] [nvarchar](50) NULL alter table [version] alter column [serialno] [nvarchar](50) NULL alter table [version] alter column [serialno2] [nvarchar](50) NULL alter table [version] alter column [msgcheck17] [nvarchar](50) NULL alter table [version] alter column [msgcontent17] [nvarchar](max) NULL alter table [version] alter column [setcheck22] [nvarchar](50) NULL alter table [version] alter column [setcheck23] [nvarchar](50) NULL alter table [version] alter column [info8] [nvarchar](120) NULL alter table [version] alter column [setcheck24] [nvarchar](120) NULL alter table [version] alter column [outtime] [nvarchar](120) NULL alter table [version] alter column [info9] [nvarchar](120) NULL alter table [version] alter column [reverse1] [nvarchar](50) NULL alter table [version] alter column [reverse2] [nvarchar](50) NULL alter table [version] alter column [reverse3] [nvarchar](50) NULL alter table [version] alter column [reverse4] [nvarchar](50) NULL alter table [version] alter column [reverse5] [nvarchar](50) NULL alter table [version] alter column [photo] [image] NULL alter table [version] alter column [delcheck1] [nvarchar](50) NULL alter table [version] alter column [delcheck2] [nvarchar](50) NULL alter table [version] alter column [delcheck3] [nvarchar](50) NULL alter table [version] alter column [delcheck4] [nvarchar](50) NULL alter table [version] alter column [deledit1] [nvarchar](50) NULL alter table [version] alter column [deledit2] [nvarchar](50) NULL alter table [version] alter column [deledit3] [nvarchar](50) NULL alter table [version] alter column [deledit4] [nvarchar](50) NULL alter table [version] alter column [alarmdays1] [nvarchar](50) NULL alter table [version] alter column [alarmdays2] [nvarchar](50) NULL alter table [version] alter column [alarmdays3] [nvarchar](50) NULL alter table [version] alter column [alarmdays4] [nvarchar](50) NULL alter table [version] alter column [alarmdays5] [nvarchar](50) NULL alter table [version] alter column [alarmdays6] [nvarchar](50) NULL go