Use sqlcmd in SQL Server 2005

xiaoxiao2021-03-31  199

Enter the following code in the query window, then click "SQLCMD Mode" to open "SQLCMD mode"

: OUT C: /TEST.TXT - Output path Select @@ version as 'server version' ---- SQL version !! DIR !!: gosect @@ servername as 'server name' - server name Gouse ExampleGosent * from SprodclsSGO

operation result:

Create a Test.txt file under the C drive

转载请注明原文地址:https://www.9cbs.com/read-130814.html

New Post(0)