2

From https://en.wikipedia.org/wiki/Microsoft_SQL_Server#T-SQL

T-SQL (Transact-SQL) is the secondary means of programming and managing SQL Server.

I thought that T-SQL is the only means for programming and managing SQL Server, because it is the only SQL language used in SQL Server.

So what do possibly multiple "means of programming and managing SQL Server" mean?

What is the primary "means of programming and managing SQL Server"?

Thanks.

  • Perhaps using the Management Studio interface? – Grantly Nov 29 '17 at 18:27
  • 2
    I wonder what the author meant by that, but from Microsoft, "All applications that communicate with an instance of SQL Server do so by sending Transact-SQL statements to the server, regardless of the user interface of the application." https://technet.microsoft.com/en-us/library/ms189826(v=sql.90).aspx – Max Szczurek Nov 29 '17 at 18:35
  • Further down in the Wikipedia entry referenced by the OP, it states Mgt Studio as the 'Primary' means. But there are quite a few ways...depending on your point of view..SQLCMD, etc – Grantly Nov 29 '17 at 18:47
  • Added this link https://en.wikipedia.org/wiki/Microsoft_SQL_Server#SQL_Server_Management_Studio to my answer – Grantly Nov 29 '17 at 18:53
  • 3
    Now has a `[citation needed]` – Martin Smith Nov 29 '17 at 19:02
  • @MartinSmith LOL good work. For me - SSMS is usually my Primary way of using SQL Server...But certainly not all the time...Other projects may be more useful to use SQLCMD exclusively, or SQL Native Client.... It does depend. So I'm glad you harassed Wikipedia - Keep 'em Honest! – Grantly Nov 29 '17 at 19:44

1 Answers1

0

The Primary means of programming and managing SQL Server is from within the SQL Server Management Studio (interface)

See here or here

Some discussion remains about whether T-SQL is a subset of commands available in SQL Server. ('Available' is a jaded word...Can any public User execute these commands directly? Not entirely sure...But I am sure that the SQL System itself supports more commands than T-SQL purely as system commands are wrapped in Stored Procedures)

For curiosity - Use this trick

sp_helptext 'ProcedureName'

to reveal the real commands used in system stored procedures...(If Security allows it for certain SPs)

Grantly
  • 2,546
  • 2
  • 21
  • 31
  • Thanks. Does SQL Server Management Studio not rely on or use T-SQL? –  Nov 29 '17 at 19:00
  • Perhaps not T-SQL exactly. T-SQL is a trimmed down set of the complete command set I believe. Besides the unpublished commands (used by the Developers only), there is a larger set of commands in SQLCMD I believe. Yes T-SQL can do most things, but I think its still a subset of the full command set – Grantly Nov 29 '17 at 19:01
  • What is the SQL dialect that SQL Server Management Studio use, if it is a superset of T-SQL? –  Nov 29 '17 at 19:06
  • One example...Say you have a massive T-SQL script - over 20 Mg of script perhaps...(including management scripts not directly part of T-SQL but able to be run via Stored Procedures) This will have to be 'executed' using SQLCMD as normal T-SQL features including OLEDB will not cope with the massive size of the script. That is one example where SQLCMD is essential, above and beyond T-SQL itself – Grantly Nov 29 '17 at 19:07
  • Good Question @Ethan ... Obviously the product has grown alot before and since owned by Microsoft...The only 'true' answer will come from the Developers, where I am sure, T-SQL is only a subset of the command set. (Where the 'rest' of the commands are basically unpublished but usable within a script like T-SQL... Therefore technically not part of T-SQL so would comprise the superset. I have used unpublished commands before but I forget which ones) – Grantly Nov 29 '17 at 19:10
  • SQLCMD is just another client tool that sends TSQL to the server. The only additional SQL CMD syntax is processed client side not by the server. – Martin Smith Nov 29 '17 at 19:12
  • I think it is more than that @MartinSmith ..."You can use sqlcmd to execute database script files. Script files are text files that contain a mix of Transact-SQL statements, sqlcmd commands, and scripting variables. " ... By this statement sqlcmd commands are separate to T-SQL commands...from here https://learn.microsoft.com/en-us/sql/relational-databases/scripting/sqlcmd-use-the-utility – Grantly Nov 29 '17 at 19:15
  • Yes they are separate to T-SQL commands. They only get sent to the sqlcmd utility. They don't get sent to the server. – Martin Smith Nov 29 '17 at 19:18
  • And some system commands are available by using Stored Procedures in T-SQL, but the actual commands (within the SP) are not T-SQL commands...So we know there are more commands hidden in there somewhere :) – Grantly Nov 29 '17 at 19:23
  • Interesting info here...(Although most of this is T-SQL) https://stackoverflow.com/questions/121243/hidden-features-of-sql-server – Grantly Nov 29 '17 at 19:24
  • 1
    I think a relatively simple example is that "GO" is not a T-SQL command but it is a command in SSMS. – Jacob H Nov 29 '17 at 19:40