質問

I'm getting really confused with all these terms. I used to attend a class called PL/SQL, then when I came out to work, I came across other terms like Stored Procedure, T-SQL and even script. They all look very similar to me, but exactly what are the differences between each of them? (if any)

役に立ちましたか?

解決

Here's some rough definitions to explain the differences.

  • PL/SQL - a SQL variation specific to Oracle databases.
  • T-SQL (Transact-SQL) - a SQL variation specific to Microsoft (and Sybase) databases.
  • Stored Procedure - a set of SQL commands that is precompiled and stored on the server for reuse
  • Script - a set of SQL commands that is run ad-hoc (not precompiled / not meant for reuse)

There are more differences between Stored Procedures and Scripts (e.g. sprocs can have parameters, etc.) but that's the fundamental difference.

他のヒント

T-SQL is Microsoft's version of SQL. PL/SQL is Oracle's version of SQL. Both are ANSI SQL compliant, but contain additional capabilities that are not in the standard.

A Stored Procedure is a prepared SQL statement that is stored on the database server, and can be reused by calling it.

Script is basically code, but scripts are typically small, standalone programs that operate without the aid of a GUI. A Stored Procedure could properly be called a script.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top