打印本文 打印本文 关闭窗口 关闭窗口
一些有用的SQL Server语句和存储过程
作者:武汉SEO闵涛  文章来源:敏韬网  点击数25141  更新时间:2007/11/14 13:07:45  文章录入:mintao  责任编辑:mintao
'''' end''''
300
301                  when xtype in (239)
302
303                       then ''''case when ''''+ name +'''' is null then ''''''''NULL'''''''' else ''''+''''''''''''N'''''''''''''''''''''''' + '''' + ''''cast(replace(''''+ name+'''','''''''''''''''''''''''''''''''','''''''''''''''''''''''''''''''''''''''''''''''') as Char('''' + cast(length as varchar)  + ''''))+''''''''''''''''''''''''''''''''''''+'''' end''''
304
305                  else ''''''''''''NULL''''''''''''
306
307                end as Cols,name
308
309           from syscolumns  
310
311          where id = object_id(@tablename
312
313        ) T 
314
315  set @sql =''''select ''''''''INSERT INTO [''''+ @tablename + '''']'''' + left(

 << 上一页  [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]  ...  下一页 >> 

打印本文 打印本文 关闭窗口 关闭窗口