📜  xp_cmdshell bcp - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:28.891000             🧑  作者: Mango

代码示例1
EXEC xp_cmdshell 'bcp "select * from (select ''a_id'' as a_id,''b_id'' as b_id,''c_id'' as c_id union select a_id,b_id,c_id from tablename)q order by case a_id when ''a_id'' then 0 ELSE 1 END" queryout "\\networkpath\a.txt" -c -Uusername -Ppassword -Sservername -ddatabasename'