ANSI SQL 手册
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1714461/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ANSI SQL Manual
提问by Adrian
Can anyone recommend a good ANSI SQL reference manual?
谁能推荐一本好的 ANSI SQL 参考手册?
I don't necessary mean a tutorial but a proper reference document to lookup when you need either a basic or more in-depth explanation or example.
当您需要基本或更深入的解释或示例时,我不一定指的是教程,而是适当的参考文档。
Currently I am using W3Schools SQL Tutorialand SQL Tutorialwhich are ok, but I don't find them "deep" enough.
目前我正在使用W3Schools SQL 教程和SQL 教程,它们还可以,但我觉得它们不够“深入”。
Of course, each major RDBMS producer will have some sort of reference manuals targeting their own product, but they tend to be biased and sometime will use proprietary extensions.
当然,每个主要的 RDBMS 生产商都会有一些针对他们自己产品的参考手册,但它们往往有偏见,有时会使用专有扩展。
EDITED: The aim of the question was to focus on the things database engines have in common i.e. the SQL roots. But understanding the differences can also be a positive thing - thisis quite interesting.
编辑:问题的目的是关注数据库引擎的共同点,即 SQL 根。但了解差异也可能是一件积极的事情——这很有趣。
采纳答案by bobince
回答by Thomas Padron-McCarthy
SQL isn't like C or Java, where there is a standard for the language, and then a number of companies and organizations are implementing the language as best they can, following the standard.
SQL 不像 C 或 Java 那样有语言标准,然后许多公司和组织正在按照标准尽可能地实施该语言。
Instead, the major databases came before the SQL standard, and the standard is a sort of compromise where every database vendor wanted to get their particular dialect and features in the standard.
相反,主要数据库出现在 SQL 标准之前,该标准是一种妥协,每个数据库供应商都希望在标准中获得他们特定的方言和功能。
Therefore, there is much more variety between databases than between typical programming language compilers, and to use a database, you really need to know that particular SQL dialect.
因此,数据库之间的差异比典型的编程语言编译器之间的差异要大得多,要使用数据库,您确实需要了解特定的 SQL 方言。
Having said that, I've got Gultzan and Peltzer's SQL-99 Complete, Reallyhere in my bookshelf. It is a good book if you need to know what the standard really contains. (And yes, there is a newer version since SQL-99, but noone seems to care.)
话虽如此,我有 Gultzan 和 Peltzer 的SQL-99 Complete,真的在我的书架上。如果您需要了解标准真正包含的内容,这是一本好书。(是的,自 SQL-99 以来有一个更新的版本,但似乎没有人关心。)
EDIT:Actually, there is not just onenewer version since SQL-99, but three: SQL:2003, SQL:2006, and SQL:2008. And still noone seems to care. Actually, many don't even care about SQL-99, so SQL-92 is still, in a way, "the standard".
编辑:实际上,自 SQL-99 以来不仅有一个更新的版本,还有三个:SQL:2003、SQL:2006 和 SQL:2008。而且似乎仍然没有人关心。实际上,很多人甚至不关心 SQL-99,所以 SQL-92 在某种程度上仍然是“标准”。
回答by S.Lott
ANSI documents can all be purchased from -- you guessed it -- ANSI.
ANSI 文档都可以从——您猜对了——ANSI 购买。
回答by Aaron Digulla
The main problem with an ANSI SQL reference manual is that you can't find a DB which implements it. And when it does, then you'll find that ANSI SQL can't solve some of the daily problems. Which is why all professional databases define extensions.
ANSI SQL 参考手册的主要问题是您找不到实现它的数据库。当它发生时,您会发现 ANSI SQL 无法解决一些日常问题。这就是为什么所有专业数据库都定义扩展的原因。
So at work, you'll need a reference manual for the specific version of the database which you use.
因此,在工作中,您需要一份针对您使用的特定数据库版本的参考手册。
回答by Yada
This reminds me of my 2nd year university course where we learn relational theory instead of SQL.
这让我想起了我大学二年级的课程,在那里我们学习关系理论而不是 SQL。
Read a good book on Relational Theory. Database theory and practice have evolved since Edgar Codd originally defined the relational model back in 1969. Independent of any SQL products, SQL and Relational Theory draws on decades of research to present the most up-to-date treatment of the material available anywhere. Anyone with a modest to advanced background in SQL will benefit from the many insights in this book.
读一本关于关系理论的好书。自 Edgar Codd 于 1969 年最初定义关系模型以来,数据库理论和实践不断发展。独立于任何 SQL 产品,SQL 和关系理论借鉴了数十年的研究,以呈现对任何地方可用材料的最新处理。任何具有中等到高级 SQL 背景的人都会从本书中的许多见解中受益。
OreillyJanuary 2009
奥雷利2009 年 1 月
回答by Ritesh M Nayak
I found the best way to learn SQL was to actually get to writing queries and understanding the nature of joins/conditionals etc. I found this link with a lot of DIY examples to be the best : http://sqlzoo.net/
我发现学习 SQL 的最好方法是真正开始编写查询并理解连接/条件等的性质。我发现这个链接有很多 DIY 示例是最好的:http: //sqlzoo.net/
回答by Michael Riley - AKA Gunny
I really like just about anything Joe Celko has written Celko's Books
我真的很喜欢 Joe Celko 写的任何Celko 的书
回答by Adrian K
The DevGuru resources always worked well for me: http://www.devguru.com/technologies/t-sql/home.asp
DevGuru 资源对我来说总是很有效:http: //www.devguru.com/technologies/t-sql/home.asp
Although I must admit it's not strictly an 'ANSI' focused resource. I've always been MS SQL centric, and it was helpful to me when I was starting out. IMHO Your best bet will be to use several resources - specifically including at least one of for each DB platform you want to use.
尽管我必须承认它严格来说并不是一个以“ANSI”为重点的资源。我一直以 MS SQL 为中心,这对我刚开始时很有帮助。恕我直言,您最好的选择是使用多种资源 - 特别是对于您要使用的每个数据库平台,至少包括一种。
To Quote the DevGuru intro for their T-SQL resource:
引用 DevGuru 介绍的 T-SQL 资源:
Although there are standards for SQL, such as ANSI SQL92 and SQL99, most databases use their own dialect and/or extentions. Microsoft's flavor of SQL used in SQL Server 7 and SQL Server 2000 is called T-SQL. While many of the examples in this quick reference may work on other databases, it is assumed that SQL Server 2000 is used, especially for advanced topics such as stored procedures.
尽管有 SQL 标准,例如 ANSI SQL92 和 SQL99,但大多数数据库使用它们自己的方言和/或扩展名。Microsoft 在 SQL Server 7 和 SQL Server 2000 中使用的 SQL 风格称为 T-SQL。虽然本快速参考中的许多示例可能适用于其他数据库,但假定使用的是 SQL Server 2000,尤其是对于存储过程等高级主题。
回答by srikanth rongali
I think this may be helpful to you.
我想这可能对你有帮助。
Understanding the ANSI SQL standard By: Kevin Kline
理解 ANSI SQL 标准 作者:Kevin Kline
http://www.amazon.com/gp/product/1565927443/102-0105946-4028970?v=glance&n=283155
http://www.amazon.com/gp/product/1565927443/102-0105946-4028970?v=glance&n=283155
回答by HLGEM
It's a littel outdated, but this book is really helpful is looking at how the differnt vendors implement things, I belive it includes ANSII standard.
它有点过时了,但是这本书在查看不同供应商如何实现事物方面确实很有帮助,我相信它包含 ANSII 标准。