打印本文 打印本文 关闭窗口 关闭窗口
一些有用的SQL Server语句和存储过程
作者:武汉SEO闵涛  文章来源:敏韬网  点击数24918  更新时间:2007/11/14 13:07:45  文章录入:mintao  责任编辑:mintao
set @db=db_name()
228
229--请修改用户名和口令 导出到Excel 中
230
231set @sql=''''exec master.dbo.xp_cmdshell ''''''''bcp ..dbo.##tx out c:\''''+@db+''''_exp.xls -w -C936 -Usa -Psa ''''''''''''
232
233print @sql
234
235exec(@sql)
236
237GO
238
239DROP TABLE ##tx
240
241GO
242
243 
244
245 
246
247 
248
249-- ======================================================
250
251--根据表中数据生成insert语句的存储过程
252
253--建立存储过程,执行 spGenInsertSQL 表名
254
255--感谢playyuer
256
257-- ======================================================
258
259CREATE   proc

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ...  下一页 >> 

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