I wonder if there is anyway you can run a shell command inside SQL.
for example "SELECT * FROM table;execute shell command"
I had googled around and didn't find anything.
Well, from what I searched on the internet, MSSQL has a stored procedure xp_cmdshell that does just that.
example:
exec master.dbo.xp_cmdshell 'copy c:\temp\doesnotexist.txt c:\temp\workfile.txt'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.