什么是SQL,PL-SQL和T-SQL的区别?
谁能解释一下这三者之间的差异,并提供每个将使用贴切的场景?
什么是SQL,PL-SQL和T-SQL的区别?
谁能解释一下这三者之间的差异,并提供每个将使用贴切的场景?
SQL
是对集进行操作的查询语言。
这或多或少规范化,几乎所有的关系型数据库管理系统中使用:SQL服务器,Oracle,MySQL和PostgreSQL,DB2,Informix的,等等。
PL/SQL
是Oracle使用的专有程序语言
PL/pgSQL
是PostgreSQL所使用的程序语言
TSQL
是在SQL Server中使用微软的专有程序语言。
程序语言设计,同时能够与SQL很好地集成到SQL扩展的能力。 几个功能,如局部变量和串/数据处理被添加。 这些特性使得语言图灵完备。
它们也可以用来编写存储过程:代码段驻留在服务器上的管理是很难或不可能有纯粹的基于集合的操作来管理复杂的业务规则。
SQL
SQL is used to communicate with a database, it is the standard language for relational database management systems.
In detail Structured Query Language is a special-purpose programming language designed for managing data held in a relational database management system (RDBMS), or for stream processing in a relational data stream management system (RDSMS).
Originally based upon relational algebra and tuple relational calculus, SQL consists of a data definition language and a data manipulation language. The scope of SQL includes data insert, query, update and delete, schema creation and modification, and data access control. Although SQL is often described as, and to a great extent is, a declarative language (4GL), it also includes procedural elements.
PL/SQL
PL/SQL is a combination of SQL along with the procedural features of programming languages. It was developed by Oracle Corporation
Specialities of PL/SQL
T-SQL
Short for Transaction-SQL, an extended form of SQL that adds declared variables, transaction control, error and exceptionhandling and row processing to SQL
The Structured Query Language or SQL is a programming language that focuses on managing relational databases. SQL has its own limitations which spurred the software giant Microsoft to build on top of SQL with their own extensions to enhance the functionality of SQL. Microsoft added code to SQL and called it Transact-SQL or T-SQL. Keep in mind that T-SQL is proprietary and is under the control of Microsoft while SQL, although developed by IBM, is already an open format.
T-SQL adds a number of features that are not available in SQL.
This includes procedural programming elements and a local variable to provide more flexible control of how the application flows. A number of functions were also added to T-SQL to make it more powerful; functions for mathematical operations, string operations, date and time processing, and the like. These additions make T-SQL comply with the Turing completeness test, a test that determines the universality of a computing language. SQL is not Turing complete and is very limited in the scope of what it can do.
Another significant difference between T-SQL and SQL is the changes done to the DELETE and UPDATE commands that are already available in SQL. With T-SQL, the DELETE and UPDATE commands both allow the inclusion of a FROM clause which allows the use of JOINs. This simplifies the filtering of records to easily pick out the entries that match a certain criteria unlike with SQL where it can be a bit more complicated.
Choosing between T-SQL and SQL is all up to the user. Still, using T-SQL is still better when you are dealing with Microsoft SQL Server installations. This is because T-SQL is also from Microsoft, and using the two together maximizes compatibility. SQL is preferred by people who have multiple backends.
References , Wikipedea , Tutorial Points :www.differencebetween.com
SQL
对于谈话的数据库语言。 它可以让你选择数据,变异和创建数据库对象(表,视图等),更改数据库设置。 PL-SQL
过程编程语言(嵌入式SQL) T-SQL
SQL Server使用(程序)扩展SQL 1. SQL或结构化查询语言是由IBM为他们的产品“系统R”制定。
后来ANSI使得它作为所有查询语言基于并扩展了它创建自己的数据库查询语言西装的标准 。 第一个标准是SQL-86和最新的存在SQL:2011
由Microsoft SQL Server 2,T-SQL或Transact-SQL由Sybase和后来发展共同拥有。
3,PL / SQL或过程语言/ SQL是Oracle数据库,被称为“关联软件”那个时候。
我在我的记录本博客文章 。
结构化查询语言 - SQL:是几乎所有SGBD在世界各地的供应商使用的ANSI标准。 基本上,SQL是用于定义和操作数据[DDL和DML]的语言。
PL / SQL是Oracle宇宙创造的语言。 PL / SQL编程结合过程说明,并允许直接操作数据库的情况下创建的程序。
T-SQL是微软产品相关的SQL模式,具有一定的特殊性。 所以,请随时测试自己的极限。
SQL是一个标准,有许多数据库厂商,如微软,甲骨文谁使用实现自己专有的语言这一标准。
Microsoft使用T-SQL来实现SQL标准,而Oracle使用PL / SQL与数据进行交互。