新聞中心
這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
sqlserver遍歷用戶表導(dǎo)出所有表數(shù)據(jù)到文本
sql server遍歷用戶表相信大家都有一些了解,下面為您介紹的是sql server遍歷用戶表導(dǎo)出所有表數(shù)據(jù)到文本文件的方法,希望對(duì)您學(xué)習(xí)sql server遍歷用戶表方面能有所幫助。

10年積累的成都網(wǎng)站建設(shè)、成都做網(wǎng)站經(jīng)驗(yàn),可以快速應(yīng)對(duì)客戶對(duì)網(wǎng)站的新想法和需求。提供各種問(wèn)題對(duì)應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先網(wǎng)站制作后付款的網(wǎng)站建設(shè)流程,更有分宜免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。
- -- To allow advanced options to be changed.
- EXEC sp_configure 'show advanced options', 1
- GO
- -- To update the currently configured value for advanced options.
- RECONFIGURE
- GO
- -- To enable the feature.
- EXEC sp_configure 'xp_cmdshell', 1
- GO
- -- To update the currently configured value for this feature.
- RECONFIGURE
- GO
- ---xp_cmdshell 'cd C:Program FilesMicrosoft SQL Server90ToolsBin'
- xp_cmdshell 'dir *.exe'
- SELECT NAME,NAME FROM SYS.OBJECTS
- xp_cmdshell 'bcp northwind.dbo.orders out c:mytest -T -c'
- declare @sql nvarchar(max)
- set @sql=''
- select @sql=@sql+' xp_cmdshell '+'''bcp northwind.dbo.'+quotename(name)+' out c:'+name+'.dat -T -c '+''' ' from sys.objects
- where type='u';
- select @sql
- exec (@sql)
新聞名稱:sqlserver遍歷用戶表導(dǎo)出所有表數(shù)據(jù)到文本
路徑分享:http://www.dlmjj.cn/article/coehohg.html


咨詢
建站咨詢
