What are the differences between osql, isql, and sqlcmd?

前端 未结 4 1400
挽巷
挽巷 2021-02-01 03:01

I am interested in using some kind of a command-line utility for SQL Server similar to Oracle\'s SQL*Plus. SQL Server seems to have several options: osql, isql, and sqlcmd. Howe

4条回答
  •  离开以前
    2021-02-01 03:28

    Use sqlcmd-- it's the most fully featured product.

    • sqlcmd: The newest, fanciest command-line interface to SQL Server.
    • isql : The older, DB-Library (native SQL Server protocol) way of command-line communication with SQL Server.
    • osql : The older, ODBC-based way of command-line communication with SQL Server.

    EDIT: Times have changed since I replied on this a couple of years ago. Nowadays, you can also use the invoke-sqlcmd cmdlet in PowerShell. If you're used to PowerShell or plan to do any scripting of any sophistication, use this instead.

提交回复
热议问题