SQL、PL-SQL 和 T-SQL 之间有什么区别? [英] What is the difference between SQL, PL-SQL and T-SQL?
问题描述
SQL、PL-SQL 和 T-SQL 有什么区别?
What is the difference between SQL, PL-SQL and T-SQL?
谁能解释一下这三者之间的区别,并提供每种方法的相关使用场景?
Can anyone explain what the differences between these three are, and provide scenarios where each would be relevantly used?
推荐答案
SQL
是一种对集合进行操作的查询语言.SQL
is a query language to operate on sets.它或多或少是标准化的,几乎被所有关系数据库管理系统使用:SQL Server、Oracle、MySQL、PostgreSQL、DB2、Informix 等.
It is more or less standardized, and used by almost all relational database management systems: SQL Server, Oracle, MySQL, PostgreSQL, DB2, Informix, etc.
PL/SQL
是 Oracle 使用的专有过程语言PL/SQL
is a proprietary procedural language used by OraclePL/pgSQL
是 PostgreSQL 使用的过程语言PL/pgSQL
is a procedural language used by PostgreSQLTSQL
是 Microsoft 在 SQL Server 中使用的专有过程语言.TSQL
is a proprietary procedural language used by Microsoft in SQL Server.过程语言旨在扩展 SQL 的能力,同时能够与 SQL 很好地集成.添加了一些功能,例如局部变量和字符串/数据处理.这些特性使语言图灵完备.
Procedural languages are designed to extend SQL's abilities while being able to integrate well with SQL. Several features such as local variables and string/data processing are added. These features make the language Turing-complete.
它们还用于编写存储过程:驻留在服务器上的代码片段,用于管理复杂的业务规则,这些规则很难或不可能通过纯基于集合的操作进行管理.
They are also used to write stored procedures: pieces of code residing on the server to manage complex business rules that are hard or impossible to manage with pure set-based operations.
这篇关于SQL、PL-SQL 和 T-SQL 之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!