T-SQL、SQL Server和SQL有什么区别 [英] What are the differences between T-SQL, SQL Server and SQL

查看:43
本文介绍了T-SQL、SQL Server和SQL有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 SQL 的了解足以完成我的工作,但阅读了不同的文章,我看到了 T-SQL、SQL Server 和 SQL.他们都一样吗?三者之间的主要区别是什么?

I know enough about SQL to get my job done but reading different articles I see T-SQL, SQL Server and SQL. Are they all the same? What are the major differences between the three?

我知道 SQL 是 ANSI 标准.另外两个呢?

I know SQL is an ANSI standard. What about the other two?

推荐答案

SQL 是用于访问关系数据库中数据的基本 ANSI 标准.当您看到MSSQL"时,它指的是 Microsoft SQL Server,它是整个数据库架构而不是一种语言.T-SQL 是 Microsoft SQL Server 使用的专有 SQL 形式.它包括不属于 ANSI 标准的特殊函数,如 cast、convert、date() 等.

SQL is the basic ANSI standard for accessing data in a relational database. When you see "MSSQL" it is referring to Microsoft SQL Server, which is the entire database architecture and not a language. T-SQL is the proprietary form of SQL used by Microsoft SQL Server. It includes special functions like cast, convert, date(), etc. that are not part of the ANSI standard.

您还会看到 plSQL 之类的东西,它是 Oracle 的 SQL 版本,还有其他版本(例如,mySQL 有自己的版本,Microsoft Access 使用 Jet SQL.)

You will also see things like plSQL, which is Oracle's version of SQL, and there are others as well (mySQL has its own version, for example, and Microsoft Access uses Jet SQL.)

重要的是要注意 SQL 的 ANSI 标准有不同的版本(例如,92 或 99,代表发布年份.).不同的数据库引擎会将自己标榜为主要符合 ANSI-92"或完全符合 ANSI-99"等,并且通常会记录任何异常.

It is important to note the the ANSI standard for SQL has different releases (for example, 92 or 99, representing the year it was released.). Different database engines will advertise themselves as "mostly ANSI-92" compliant or "fully ANSI-99" compliant, etc, and any exceptions will usually be documented.

因此,尽管SQL 就是 SQL",但每个引擎都使用它自己的风格",在深入研究之前,您必须在特定平台上阅读一些内容.

So although "SQL is SQL", every engine uses its own "flavor" of it, and you do have to do a little reading on the particular platform before you just dive in.

进一步说明 - SQL 扩展,如 T-SQL,通常被认为是成熟的编程语言,包括循环、if/then、case 语句等.SQL 本身仅限于简单的查询和更新数据,并且是不被视为真正的编程语言.

A further note - the SQL extensions, like T-SQL, are generally considered full-fledged programming languages, complete with looping, if/then, case statements, etc. SQL itself is limited to simply querying and updating data and is not considered a true programming language.

维基百科有一篇不错的文章供概述:http://en.wikipedia.org/wiki/SQL

Wikipedia has a decent article for an overview here: http://en.wikipedia.org/wiki/SQL

这篇关于T-SQL、SQL Server和SQL有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆