自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

sql server遍歷用戶表導(dǎo)出所有表數(shù)據(jù)到文本

數(shù)據(jù)庫(kù) SQL Server
sql server數(shù)據(jù)庫(kù)中,遍歷用戶表是經(jīng)常會(huì)用到的,下文對(duì)sql server遍歷用戶表導(dǎo)出所有表數(shù)據(jù)到文本的方法作了詳細(xì)的介紹,供您參考。

sql server遍歷用戶表相信大家都有一些了解,下面為您介紹的是sql server遍歷用戶表導(dǎo)出所有表數(shù)據(jù)到文本文件的方法,希望對(duì)您學(xué)習(xí)sql server遍歷用戶表方面能有所幫助。

  1. -- To allow advanced options to be changed.  
  2. EXEC sp_configure 'show advanced options', 1  
  3. GO  
  4. -- To update the currently configured value for advanced options.  
  5. RECONFIGURE  
  6. GO  
  7. -- To enable the feature.  
  8. EXEC sp_configure 'xp_cmdshell', 1  
  9. GO  
  10. -- To update the currently configured value for this feature.  
  11. RECONFIGURE  
  12. GO  
  13.  
  14. ---xp_cmdshell 'cd C:Program FilesMicrosoft SQL Server90ToolsBin'  
  15. xp_cmdshell 'dir *.exe'  
  16.  
  17.  
  18. SELECT NAME,NAME FROM SYS.OBJECTS  
  19. xp_cmdshell 'bcp northwind.dbo.orders out c:mytest -T -c'  
  20.  
  21. declare @sql nvarchar(max)  
  22. set @sql='' 
  23. select @sql=@sql+' xp_cmdshell '+'''bcp northwind.dbo.'+quotename(name)+' out c:'+name+'.dat -T -c '+''' ' from sys.objects    
  24. where type='u';  
  25. select @sql  
  26. exec (@sql) 

 

 

 

 

【編輯推薦】

SQL Server系統(tǒng)表的應(yīng)用

Sql Server全文索引的遷移

SQL SERVER全文檢索的實(shí)現(xiàn)

SQL Server刪除用戶失敗的解決方法

sql server系統(tǒng)表說(shuō)明

責(zé)任編輯:段燃 來(lái)源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-11-11 10:41:03

sql server遍

2021-04-30 08:11:55

SQLSQL Server 數(shù)據(jù)庫(kù)

2010-07-22 10:38:12

SQL Server所

2010-09-25 15:37:38

SQL語(yǔ)句

2010-11-11 10:53:22

SQL Server遍

2010-04-22 17:06:24

Oracle數(shù)據(jù)庫(kù)

2010-07-22 16:02:29

2011-08-15 15:53:51

SQL Server數(shù)批量操作

2010-10-22 16:20:39

SQL Server表

2011-08-24 12:35:03

SQL Server按條件批量導(dǎo)出為多個(gè)E

2010-11-12 14:21:15

SQL函數(shù)

2010-10-22 16:48:49

SQL刪除所有表數(shù)據(jù)

2010-11-11 09:20:46

SQL Server創(chuàng)

2011-03-22 13:49:20

SQL Server數(shù)維度表事實(shí)表

2010-09-16 14:13:11

SQL Server系

2010-04-19 16:28:04

Oracle導(dǎo)出

2010-09-16 15:03:10

SQL Server臨

2010-11-10 15:07:40

sql server系

2010-09-16 17:56:31

SQL server臨

2010-09-16 15:10:48

SQL Server表
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)