Array ( [0] => {{About|the database language}} [1] => {{redirect|SEQUEL|the topic of the word|sequel|other uses|Sequel (disambiguation)}} [2] => {{Short description|Programming language for management and use of relational databases}} [3] => {{infobox programming language [4] => | name = SQL (Structured Query Language) [5] => | paradigm = [[Declarative programming|Declarative]] [6] => | family = [[Query language]] [7] => | released = {{Start date and age|1974|df=yes}} [8] => | designer = [[Donald D. Chamberlin]]
[[Raymond F. Boyce]] [9] => | developer = [[ISO/IEC JTC 1/SC 32|ISO/IEC JTC 1 (Joint Technical Committee 1) / SC 32 (Subcommittee 32)]] / WG 3 (Working Group 3) [10] => | typing = [[Static typing|Static]], [[strong typing|strong]] [11] => | implementations = [[List of relational database management systems|Many]] [12] => | dialects = {{flatlist| [13] => * SQL-86 [14] => * SQL-89 [15] => * [[SQL-92]] [16] => * [[SQL:1999]] [17] => * [[SQL:2003]] [18] => * [[SQL:2006]] [19] => * [[SQL:2008]] [20] => * [[SQL:2011]] [21] => * [[SQL:2016]] [22] => * [[SQL:2023]] [23] => }} [24] => | influenced = [[Contextual Query Language|CQL]], [[Language Integrated Query|LINQ]], [[SPARQL]], SOQL, [[PowerShell]], [[Java Persistence Query Language|JPQL]], [[Java Object Oriented Querying|jOOQ]], [[N1QL]] [25] => | website = {{URL|https://www.iso.org/standard/76583.html}} [26] => | latest_release_version = [[SQL:2023]] [27] => | latest_release_date = {{Start date and age|2023|06|df=yes}} [28] => | influenced_by = [[Datalog]] [29] => | operating_system = [[Cross-platform]] [30] => | fileformat = [31] => | wikibooks = Structured Query Language [32] => }} [33] => {{Infobox file format [34] => | name = SQL (file format) [35] => | icon = [36] => | extension = .sql [37] => | mime = application/sql [38] => | uniform type = [39] => | owner = [[ISO]]/[[International Electrotechnical Commission|IEC]] [40] => | released = {{Start date|1986|df=yes}} [41] => | latest release version = [42] => | latest release date = [43] => | genre = Database [44] => | standard = [[ISO/IEC 9075]] [45] => | open = Yes [46] => | url = {{URL|https://www.iso.org/standard/76583.html}} [47] => }} [48] => [49] => '''Structured Query Language''' ('''SQL''') (pronounced ''S-Q-L''; historically "sequel"){{cite web |url=https://conservancy.umn.edu/handle/11299/107215 |last=Chamberlin |first=Donald D. |first2=Philip L. |last2=Frana |website=University Digital Conservancy |title=Oral history interview with Donald D. Chamberlin |date=2001-10-03 |access-date=2020-01-14 |quote=We changed the original name "SEQUEL" to SQL because we got a letter from somebody's lawyer that said the name "SEQUEL" belonged to them. We shortened it to SQL, for Structured Query Language, and the product was known as SQL/DS.}} is a [[domain-specific language]] used to manage data, especially in a [[relational database management system]] (RDBMS). It is particularly useful in handling [[Data model|structured data]], i.e., data incorporating relations among entities and variables. [50] => [51] => Introduced in the 1970s, SQL offered two main advantages over older read–write [[API]]s such as [[ISAM]] or [[VSAM]]. Firstly, it introduced the concept of accessing many [[Record (computer science)|records]] with one single [[Command-line interface|command]]. Secondly, it eliminates the need to specify ''how'' to reach a record, i.e., with or without an [[Database index|index]]. [52] => [53] => Originally based upon [[relational algebra]] and [[tuple relational calculus]], SQL consists of many types of statements,[[SQL-92]], 4.22 SQL-statements, 4.22.1 Classes of SQL-statements "There are at least five ways of classifying SQL-statements:", 4.22.2, SQL statements classified by function "The following are the main classes of SQL-statements:"; [[SQL:2003]] 4.11 SQL-statements, and later revisions. which may be informally classed as [[sublanguage]]s, commonly: [[data query language|Data query Language]] (DQL), [[data definition language|Data Definition Language]] (DDL), [[data control language|Data Control Language]] (DCL), and [[data manipulation language|Data Manipulation Language]] (DML).{{cite book [54] => |title=Structured Query Language By Example - Volume I: Data Query Language [55] => |first=Mark [56] => |last=Chatham [57] => |url=https://books.google.com/books?id=64MBBAAAQBAJ&pg=PA8 [58] => |year=2012 [59] => |isbn=9781291199512 [60] => |page=8 [61] => |publisher=Lulu.com [62] => }} [63] => [64] => The scope of SQL includes data query, data manipulation (insert, update, and delete), data definition ([[database schema|schema]] creation and modification), and data access control. Although SQL is essentially a [[Declarative programming|declarative language]] ([[4GL]]), it also includes [[Procedural programming|procedural]] elements. [65] => [66] => SQL was one of the first commercial languages to use [[Edgar F. Codd]]'s [[relational model]]. The model was described in his influential 1970 paper, "A Relational Model of Data for Large Shared Data Banks". Despite not entirely adhering to [[Codd's 12 rules|the relational model as described by Codd]], SQL became the most widely used database language. [67] => [68] => SQL became a [[Technical standard|standard]] of the [[American National Standards Institute]] (ANSI) in 1986 and of the [[International Organization for Standardization]] (ISO) in 1987. Since then, the standard has been revised multiple times to include a larger set of features and incorporate common extensions. Despite the existence of standards, virtually no implementations in existence adhere to it fully, and most SQL code requires at least some changes before being ported to different [[database]] systems. [69] => {{toclimit|3}} [70] => [71] => ==History== [72] => [73] => SQL was initially developed at [[IBM]] by [[Donald D. Chamberlin]] and [[Raymond F. Boyce]] after learning about the relational model from [[Edgar F. Codd]] in the early 1970s. This version, initially called SEQUEL (Structured English Query Language), was designed to manipulate and retrieve data stored in IBM's original quasirelational database management system, [[IBM System R|System R]], which a group at [[IBM Almaden Research Center|IBM San Jose Research Laboratory]] had developed during the 1970s. [74] => [75] => Chamberlin and Boyce's first attempt at a relational database language was SQUARE (Specifying Queries in A Relational Environment), but it was difficult to use due to subscript/superscript notation. After moving to the San Jose Research Laboratory in 1973, they began work on a sequel to SQUARE. The original name SEQUEL, which is widely regarded as a pun on [[QUEL query languages|QUEL]], the query language of [[Ingres (database)|Ingres]],{{Cite web |last=Starkey |first=Jim |title=Dynamic SQL, Plumbing, and the Internal API |url=https://www.ibphoenix.com/resources/documents/design/doc_123 |access-date=2023-01-19 |website=www.ibphoenix.com}} was later changed to SQL (dropping the vowels) because "SEQUEL" was a [[trademark]] of the UK-based [[Hawker Siddeley]] Dynamics Engineering Limited company. The label SQL later became the acronym for Structured Query Language. [76] => [77] => After testing SQL at customer test sites to determine the usefulness and practicality of the system, IBM began developing commercial products based on their System R prototype, including [[IBM System/38|System/38]], [[IBM SQL/DS|SQL/DS]], and [[IBM Db2]], which were commercially available in 1979, 1981, and 1983, respectively. [78] => [79] => In the late 1970s, Relational Software, Inc. (now [[Oracle Corporation]]) saw the potential of the concepts described by Codd, Chamberlin, and Boyce, and developed their own SQL-based [[Relational database|RDBMS]] with aspirations of selling it to the [[United States Navy|U.S. Navy]], [[Central Intelligence Agency]], and other [[Federal government of the United States|U.S. government]] agencies. In June 1979, Relational Software introduced one of the first commercially available implementations of SQL, [[Oracle Database|Oracle]] V2 (Version2) for [[VAX]] computers. [80] => [81] => By 1986, [[American National Standards Institute|ANSI]] and [[International Organization for Standardization|ISO]] standard groups officially adopted the standard "Database Language SQL" language definition. New versions of the standard were published in 1989, 1992, 1996, 1999, 2003, 2006, 2008, 2011,{{cite journal|last1=Chamberlin|first1=Donald|title=Early History of SQL|journal=IEEE Annals of the History of Computing|date=2012|volume=34|issue=4|pages=78–82|doi=10.1109/MAHC.2012.61|s2cid=1322572}} 2016 and most recently, 2023.{{cite web |title=ISO - ISO/IEC JTC 1/SC 32 - Data management and interchange |url=https://www.iso.org/committee/45342/x/catalogue/p/1/u/0/w/0/d/0 |website=www.iso.org |access-date=2 January 2021}} [82] => [83] => ==Syntax== [84] => {{Main|SQL syntax}} [85] => [86] => {{Image frame|content= [87] => [88] => \underbrace{\left. \begin{array}{rl} \textstyle\mathtt{UPDATE~clause\mathtt{:}} & \{ \mathtt{UPDATE\ \overbrace{\mathtt{countries}}^\mathtt{table}} \} \\ [89] => \textstyle\mathtt{SET~clause:} & \{ {\mathtt{SET\ \overbrace{\mathtt{population}}^\mathtt{column} =~} \overbrace{\mathtt{{population} + \underbrace{\mathtt{1}}_\mathtt{literal}}}^\mathtt{expression}} \} \\ [90] => \textstyle\mathtt{WHERE~clause:} & \{ {\mathtt{WHERE\ \underbrace{\overbrace{\mathtt{name}}^\mathtt{column} \mathtt{=} \overbrace{{\overbrace{\mathtt{'USA'}}^\mathtt{literal}}}^\mathtt{expression}}_\mathtt{predicate}}\}{\texttt{;}}} [91] => \end{array} [92] => \right \}{\textstyle\texttt{statement}}}_{\textstyle\mathtt{SQL~query}} [93] => [94] => |width=500|caption=A chart showing several of the SQL language elements comprising a single statement}} [95] => [96] => The SQL language is subdivided into several language elements, including: [97] => [98] => * ''Clauses'', which are constituent components of statements and queries. (In some cases, these are optional.) [99] => * ''Expressions'', which can produce either [[scalar (computing)|scalar]] values, or [[table (database)|tables]] consisting of [[column (database)|columns]] and [[row (database)|rows]] of data [100] => * ''Predicates'', which specify conditions that can be evaluated to SQL [[Three-valued logic|three-valued logic (3VL)]] (true/false/unknown) or [[Boolean logic|Boolean]] [[truth value]]s and are used to limit the effects of statements and queries, or to change program flow. [101] => * ''Queries'', which retrieve the data based on specific criteria. This is an important element of ''SQL''. [102] => * ''Statements'', which may have a persistent effect on schemata and data, or may control [[Database transaction|transactions]], program flow, connections, sessions, or diagnostics. [103] => ** SQL statements also include the [[semicolon]] (";") statement terminator. Though not required on every platform, it is defined as a standard part of the SQL grammar. [104] => * ''[[Whitespace (computer science)|Insignificant whitespace]]'' is generally ignored in SQL statements and queries, making it easier to format SQL code for readability. [105] => [106] => ==Procedural extensions== [107] => [108] => SQL is designed for a specific purpose: to query [[data]] contained in a [[relational database]]. SQL is a [[Set (computer science)|set]]-based, [[declarative programming language]], not an [[imperative programming language]] like [[C (programming language)|C]] or [[BASIC]]. However, extensions to Standard SQL add [[procedural programming language]] functionality, such as control-of-flow constructs. [109] => [110] => In addition to the standard SQL/PSM extensions and proprietary SQL extensions, procedural and [[object-oriented programming language|object-oriented]] programmability is available on many SQL platforms via DBMS integration with other languages. The SQL standard defines [[SQL/JRT]] extensions (SQL Routines and Types for the Java Programming Language) to support [[Java (programming language)|Java]] code in SQL databases. [[Microsoft SQL Server 2005]] uses the [[SQLCLR]] (SQL Server Common Language Runtime) to host managed [[Microsoft .NET|.NET]] assemblies in the [[database]], while prior versions of SQL Server were restricted to unmanaged extended stored procedures primarily written in C. [[PostgreSQL]] lets users write functions in a wide variety of languages—including [[Perl]], [[Python (programming language)|Python]], [[Tcl]], [[JavaScript]] (PL/V8) and C. [111] => [112] => ==Interoperability and standardization== [113] => ===Overview=== [114] => SQL implementations are incompatible between vendors and do not necessarily completely follow standards. In particular, date and time syntax, string concatenation, NULLs, and comparison [[case sensitivity]] vary from vendor to vendor. [[PostgreSQL]] and [[Mimer SQL]] strive for standards compliance, though PostgreSQL does not adhere to the standard in all cases. For example, the folding of unquoted names to lower case in PostgreSQL is incompatible with the SQL standard,{{cite web|url=https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS|title=4.1. Lexical Structure|date=2018|website=PostgreSQL documentation}} which says that unquoted names should be folded to upper case.{{cite web|url=http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt|title=(Second Informal Review Draft) ISO/IEC 9075:1992, Database Language SQL, Section 5.2, syntax rule 11|date=30 July 1992}} Thus, according to the standard, Foo should be equivalent to FOO, not foo. [115] => [116] => Popular implementations of SQL commonly omit support for basic features of Standard SQL, such as the DATE or TIME data types. The most obvious such examples, and incidentally the most popular commercial and proprietary SQL DBMSs, are Oracle (whose DATE behaves as DATETIME, and lacks a TIME type) and MS SQL Server (before the 2008 version). As a result, SQL code can rarely be ported between database systems without modifications. [117] => [118] => ===Reasons for incompatibility=== [119] => Several reasons for the lack of portability between database systems include: [120] => [121] => * The complexity and size of the SQL standard means that most implementers do not support the entire standard. [122] => * The SQL standard does not specify the database behavior in some important areas (e.g., [[index (database)|indices]], file storage), leaving implementations to decide how to behave. [123] => * The SQL standard defers some decisions to individual implementations, such as how to name a results column that was not named explicitly.{{cite book |last1=Date |first1=Chris J. |title=Relational Theory for Computer Professionals: What Relational Databases are Really All About |date=2013 |publisher=O'Reilly Media |location=Sebastopol, Calif |isbn=978-1-449-36943-9 |edition=1.}}{{rp|207}} [124] => * The SQL standard precisely specifies the syntax that a conforming database system must implement. However, the standard's specification of the semantics of language constructs is less well-defined, leading to ambiguity. [125] => * Many database vendors have large existing customer bases; where the newer version of the SQL standard conflicts with the prior behavior of the vendor's database, the vendor may be unwilling to break [[backward compatibility]]. [126] => * Little commercial incentive exists for vendors to make changing database suppliers easier (see [[vendor lock-in]]). [127] => * Users evaluating database software tend to place other factors such as performance higher in their priorities than standards conformance. [128] => [129] => ===Standardization history=== [130] => SQL was adopted as a standard by the ANSI in 1986 as SQL-86 and the ISO in 1987. It is maintained by [[ISO/IEC JTC 1/SC 32|''ISO/IEC JTC 1, Information technology, Subcommittee SC 32, Data management and interchange'']]. [131] => [132] => Until 1996, the [[National Institute of Standards and Technology]] (NIST) data-management standards program certified SQL DBMS compliance with the SQL standard. Vendors now self-certify the compliance of their products. [133] => [134] => The original standard declared that the official pronunciation for "SQL" was an [[initialism]]: {{IPAc-en|ˌ|ɛ|s|ˌ|k|juː|ˈ|ɛ|l}} ("ess cue el"). Regardless, many English-speaking database professionals (including Donald Chamberlin himself) use the [[acronym]]-like pronunciation of {{IPAc-en|ˈ|s|iː|k|w|əl}} ("sequel"), mirroring the language's prerelease development name, "SEQUEL".
The SQL standard has gone through a number of revisions: [135] => [136] => {| class=wikitable [137] => |- [138] => ! Year [139] => ! Name [140] => ! Alias [141] => ! Comments [142] => |- [143] => | 1986 [144] => | SQL-86 [145] => | SQL-87 [146] => | First formalized by ANSI [147] => |- [148] => | 1989 [149] => | SQL-89 [150] => | [[Federal Information Processing Standard|FIPS]] 127-1 [151] => | Minor revision that added integrity constraints adopted as FIPS 127-1 [152] => |- [153] => | 1992 [154] => | [[SQL-92]] [155] => | SQL2, FIPS 127-2 [156] => | Major revision (ISO 9075), ''Entry Level'' SQL-92 adopted as FIPS 127-2 [157] => |- [158] => | 1999 [159] => | [[SQL:1999]] [160] => | SQL3 [161] => | Added regular expression matching, [[hierarchical and recursive queries in SQL|recursive queries]] (e.g., [[transitive closure]]), [[Database trigger|triggers]], support for procedural and control-of-flow statements, nonscalar types (arrays), and some object-oriented features (e.g., [[structured type]]s), support for embedding SQL in Java ([[SQL/OLB]]) and vice versa ([[SQL/JRT]]) [162] => |- [163] => | 2003 [164] => | [[SQL:2003]] [165] => | [166] => | Introduced [[XML]]-related features ([[SQL/XML]]), [[SQL window function|window functions]], standardized sequences, and columns with autogenerated values (including identity columns) [167] => |- [168] => | 2006 [169] => | [[SQL:2006]] [170] => | [171] => | ISO/IEC 9075-14:2006 defines ways that SQL can be used with XML. It defines ways of importing and storing XML data in an SQL database, manipulating it within the database, and publishing both XML and conventional SQL data in XML form. In addition, it lets applications integrate queries into their SQL code with [[XQuery]], the XML Query Language published by the World Wide Web Consortium ([[W3C]]), to concurrently access ordinary SQL-data and XML documents. [172] => |- [173] => | 2008 [174] => | [[SQL:2008]] [175] => | [176] => | Legalizes ORDER BY outside cursor definitions. Adds INSTEAD OF triggers, TRUNCATE statement, FETCH clause [177] => |- [178] => | 2011 [179] => | [[SQL:2011]] [180] => | [181] => | Adds temporal data (PERIOD FOR) (more information at [[Temporal database#History]]). Enhancements for [[SQL window function|window functions]] and FETCH clause. [182] => |- [183] => | 2016 [184] => | [[SQL:2016]] [185] => | [186] => | Adds row pattern matching, polymorphic table functions, operations on [[JSON]] data stored in character string fields [187] => |- [188] => |2019 [189] => |SQL:2019–2020 [190] => | [191] => |Adds Part 15, multidimensional arrays (MDarray type and operators) [192] => |- [193] => |2023 [194] => | [[SQL:2023]] [195] => | [196] => |Adds data type JSON (SQL/Foundation); Adds Part 16, Property Graph Queries (SQL/PGQ) [197] => |} [198] => [199] => ===Current standard=== [200] => The standard is commonly denoted by the pattern: ''ISO/IEC 9075-n:yyyy Part n: title'', or, as a shortcut, ''[[ISO/IEC 9075]]''. Interested parties may purchase the standards documents from ISO,{{cite web | url = https://www.iso.org/search.html | title = ISO/IEC 9075}} IEC, or ANSI. Some old drafts are freely available. [201] => [202] => ''[[ISO/IEC 9075]]'' is complemented by ''ISO/IEC 13249: SQL Multimedia and Application Packages'' and some ''Technical reports''. [203] => [204] => ==Alternatives== [205] => A distinction should be made between alternatives to SQL as a language, and alternatives to the relational model itself. Below are proposed relational alternatives to the SQL language. See [[navigational database]] and [[NoSQL]] for alternatives to the relational model. [206] => {{Div col}} [207] => * [[.QL]]: object-oriented Datalog [208] => * [[4th Dimension (Software)|4D Query Language]] (4D QL) [209] => * [[Datalog]]: critics suggest that [[Datalog]] has two advantages over SQL: it has cleaner semantics, which facilitates program understanding and maintenance, and it is more expressive, in particular for recursive queries. [210] => * [[HTSQL]]: URL based query method [211] => * [[IBM Business System 12]] (IBM BS12): one of the first fully relational database management systems, introduced in 1982 [212] => * [[ISBL]] [213] => * [[Java Object Oriented Querying|jOOQ]]: SQL implemented in Java as an [[Domain-specific language|internal domain-specific language]] [214] => * [[Java Persistence Query Language]] (JPQL): The query language used by the Java Persistence API and [[Hibernate (Java)|Hibernate]] persistence library [215] => * [[JavaScript]]: [[MongoDB]] implements its query language in a JavaScript API. [216] => * [[Language Integrated Query|LINQ]]: Runs SQL statements written like language constructs to query collections directly from inside [[.NET Framework|.Net]] code [217] => * [[Object Query Language]] [218] => * QBE ([[Query By Example]]) created by Moshè Zloof, IBM 1977 [219] => * [[QUEL query languages|QUEL]] introduced in 1974 by the U.C. Berkeley Ingres project, closer to [[tuple relational calculus]] than SQL [220] => * [[XQuery]] [221] => {{Div col end}} [222] => [223] => ==Distributed SQL processing== [224] => [[DRDA|Distributed Relational Database Architecture]] (DRDA) was designed by a workgroup within IBM from 1988 to 1994. DRDA enables network-connected relational databases to cooperate to fulfill SQL requests.{{cite journal|last1=Reinsch, R.|title=Distributed database for SAA|journal=IBM Systems Journal|date=1988|volume=27|issue=3|pages=362–389|doi=10.1147/sj.273.0362}}{{cite book|title=Distributed Relational Database Architecture Reference|date=1990|publisher=IBM Corp. SC26-4651-0}} [225] => [226] => An interactive user or program can issue SQL statements to a local RDB and receive tables of data and status indicators in reply from remote RDBs. SQL statements can also be compiled and stored in remote RDBs as packages and then invoked by package name. This is important for the efficient operation of application programs that issue complex, high-frequency queries. It is especially important when the tables to be accessed are located in remote systems. [227] => [228] => The messages, protocols, and structural components of DRDA are defined by the [[Distributed Data Management Architecture]]. Distributed SQL processing ala DRDA is distinctive from contemporary [[distributed SQL]] databases. [229] => [230] => ==Criticisms== [231] => ===Design=== [232] => [233] => SQL deviates in several ways from its theoretical foundation, the relational model and its tuple calculus. In that model, a table is a [[set (mathematics)|set]] of tuples, while in SQL, tables and query results are [[list (computing)|list]]s of rows; the same row may occur multiple times, and the order of rows can be employed in queries (e.g., in the LIMIT clause). [234] => Critics argue that SQL should be replaced with a language that returns strictly to the original foundation: for example, see ''The Third Manifesto'' by Hugh Darwen and C.J. Date (2006, {{ISBN|0-321-39942-0}}). [235] => [236] => ===Orthogonality and completeness=== [237] => Early specifications did not support major features, such as primary keys. Result sets could not be named, and subqueries had not been defined. These were added in 1992. [238] => [239] => The lack of [[sum type]]s has been described as a roadblock to full use of SQL's user-defined types. JSON support, for example, needed to be added by a new standard in 2016.{{cite web |last1=Brandon |first1=Jamie |title=Against SQL |url=https://scattered-thoughts.net/writing/against-sql/ |access-date=2 August 2021 |language=en |date=July 2021}} [240] => [241] => ===Null=== [242] => The concept of [[Null (SQL)|Null]] is the subject of some [[Null (SQL)#Criticisms|debate]]. The Null marker indicates the absence of a value, and is distinct from a value of 0 for an integer column or an empty string for a text column. The concept of Nulls enforces the [[Null (SQL)#Comparisons with NULL and the three-valued logic (3VL)|3-valued-logic in SQL]], which is a concrete implementation of the general [[Three-valued logic|3-valued logic]]. [243] => [244] => ===Duplicates=== [245] => Another popular criticism is that it allows duplicate rows, making integration with languages such as [[Python (programming language)|Python]], whose data types might make accurately representing the data difficult, in terms of parsing and by the absence of modularity. This is usually avoided by declaring a primary key, or a unique constraint, with one or more columns that uniquely identify a row in the table. [246] => [247] => ===Impedance mismatch=== [248] => In a sense similar to [[object–relational impedance mismatch]], a mismatch occurs between the declarative SQL language and the procedural languages in which SQL is typically embedded.{{Cn|date=February 2024}} [249] => [250] => ==SQL data types== [251] => The SQL standard defines three kinds of [[data type]]s (chapter 4.1.1 of SQL/Foundation): [252] => * predefined data types [253] => * constructed types [254] => * user-defined types. [255] => [256] => ''Constructed types'' are one of ARRAY, MULTISET, REF(erence), or ROW. ''User-defined types'' are comparable to classes in object-oriented language with their own constructors, observers, mutators, methods, inheritance, overloading, overwriting, interfaces, and so on. ''Predefined data types'' are intrinsically supported by the implementation. [257] => [258] => ===Predefined data types=== [259] => [260] => * Character types [261] => ** Character (CHAR) [262] => ** Character varying (VARCHAR) [263] => ** Character large object (CLOB) [264] => * National character types [265] => ** National character (NCHAR) [266] => ** National character varying (NCHAR VARYING) [267] => ** National character large object (NCLOB) [268] => * Binary types [269] => ** Binary (BINARY) [270] => ** Binary varying (VARBINARY) [271] => ** Binary large object (BLOB) [272] => * Numeric types [273] => ** Exact numeric types (NUMERIC, DECIMAL, SMALLINT, INTEGER, BIGINT) [274] => ** Approximate numeric types (FLOAT, REAL, DOUBLE PRECISION) [275] => ** Decimal floating-point type (DECFLOAT) [276] => * Datetime types (DATE, TIME, TIMESTAMP) [277] => * Interval type (INTERVAL) [278] => * Boolean [279] => * XML (see [[SQL/XML]]){{Cite web |last= |date=November 2003 |title=SQL 2003 Standard Support in Oracle Database 10g |url=https://www.oracle.com/technetwork/database/sql-2003-twp-129141.pdf |access-date=2024-03-27 |website=Oracle |publisher=[[Oracle Corporation]] |language=en-us}} XML supported was added in ANSI SQL 2003, part 14. [280] => * [[JSON]] [281] => [282] => [283] => ==See also== [284] => {{div col|colwidth=20em}} [285] => * [[b:SQL|Wikibook SQL]] [286] => * [[Object database]] [287] => * [[List of relational database management systems]] [288] => * [[Comparison of relational database management systems]] [289] => * [[Comparison of object–relational database management systems]] [290] => * [[Query by Example]] [291] => * [[List of SQL reserved words|SQL reserved words]] [292] => * [[SQL syntax]] [293] => * [[PL/SQL|Oracle PL/SQL]] [294] => * [[Transact-SQL|Microsoft Transact-SQL (T-SQL)]] [295] => * [[Online transaction processing|Online transaction processing (OLTP)]] [296] => * [[Online analytical processing|Online analytical processing (OLAP)]] [297] => * [[Data warehouse]] [298] => * [[Relational data stream management system]] [299] => * [[NoSQL]] [300] => * [[MUMPS]] [301] => * [[Hierarchical database model]] [302] => * [[Star schema]] [303] => * [[Snowflake schema]] [304] => {{div col end}} [305] => [306] => ==Notes== [307] => {{notelist}} [308] => [309] => ==References== [310] => {{Reflist|30em|refs= [311] => {{cite web | last = Paul | first = Ryan | title = A guided tour of the Microsoft Command Shell | url = https://arstechnica.com/business/news/2005/10/msh.ars/4 | website = Ars Technica | date = 24 October 2005 | access-date = 10 April 2011 }} [312] => {{cite web | url = https://www.iana.org/assignments/media-types/application/sql | title = Media Type registration for application/sql | publisher = [[Internet Assigned Numbers Authority]] | date = 10 April 2013 | access-date = 10 April 2013 }} [313] => {{cite web | url = http://tools.ietf.org/html/rfc6922 | title = The application/sql Media Type, RFC 6922 | page = 3 | publisher = [[Internet Engineering Task Force]] | date = April 2013 | doi = 10.17487/RFC6922 | access-date = 10 April 2013 | last1 = Shafranovich | first1 = Y. }} [314] => {{ cite book | last = Beaulieu | first = Alan | title = Learning SQL | editor = Mary E Treseler | publisher = O'Reilly | location = Sebastopol, CA, USA | date = April 2009 | edition = 2nd | isbn = 978-0-596-52083-0 }} [315] => [316] => {{ cite journal | last = Codd | first = Edgar F. | title = A Relational Model of Data for Large Shared Data Banks | journal = Communications of the ACM | volume = 13 | issue = 6 | pages = 377–87 | date = June 1970 | doi = 10.1145/362384.362685 | citeseerx = 10.1.1.88.646 | s2cid = 207549016 }} [317] => {{cite web | last = Chapple | first = Mike | title = SQL Fundamentals | work = Databases | publisher = About.com | url = http://databases.about.com/od/sql/a/sqlfundamentals.htm | access-date = 2009-01-28 }} [318] => {{cite web | title = Structured Query Language (SQL) | publisher = International Business Machines | url = http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=com.ibm.db2.udb.admin.doc/doc/c0004100.htm | date = October 27, 2006 | access-date = 2007-06-10 }} [319] => {{cite web | url = https://www.iso.org/standard/16661.html | title = ISO 9075:1987: Information technology – Database languages – SQL – Part 1: Framework (SQL/Framework) | date = 1987-06-01}} [320] => {{ cite journal | last1 = Chamberlin | first1 = Donald D | last2 = Boyce | first2 = Raymond F | title = SEQUEL: A Structured English Query Language | journal = Proceedings of the 1974 ACM SIGFIDET Workshop on Data Description, Access and Control | pages = 249–64 | publisher = Association for Computing Machinery | year = 1974 | url = http://www.almaden.ibm.com/cs/people/chamberlin/sequel-1974.pdf | access-date = 2007-06-09 | archive-url=https://web.archive.org/web/20070926212100/http://www.almaden.ibm.com/cs/people/chamberlin/sequel-1974.pdf |archive-date=2007-09-26 |url-status=dead }} [321] => {{ cite book | last = Oppel | first = Andy | title = Databases Demystified | publisher = McGraw-Hill Osborne Media | date = February 27, 2004 | location = [[San Francisco, CA]] | pages = 90–1 | url = http://www.mhprofessional.com/product.php?cat=112&isbn=0071469605 | isbn = 978-0-07-146960-9}} [322] => {{cite web | title = History of IBM, 1978 | work = IBM Archives | date = 23 January 2003 | publisher = IBM | url = http://www-03.ibm.com/ibm/history/history/year_1978.html | access-date = 2007-06-09 }} [323] => ANSI/ISO/IEC International Standard (IS). Database Language SQL—Part 2: Foundation (SQL/Foundation). 1999. [324] => {{cite web | title = PostgreSQL server programming | work = PostgreSQL 9.1 official documentation | publisher = postgresql.org | year = 2011 | url = http://www.postgresql.org/docs/9.1/static/server-programming.html | access-date = 2012-03-09 }} [325] => {{cite web|url=http://lbd.udc.es/jornadas2011/actas/PROLE/PROLE/S5/13_article.pdf |title=Outer Joins in a Deductive Database System |author=Fernando Saenz-Perez |website=Lbd.udc.es |access-date=2017-01-16}} [326] => {{cite web | title = About PostgreSQL | work = PostgreSQL 9.1 official website | publisher = PostgreSQL Global Development Group | year = 2012 | url = http://www.postgresql.org/about/ | quote = PostgreSQL prides itself in standards compliance. Its SQL implementation strongly conforms to the ANSI-SQL:2008 standard | access-date = March 9, 2012 }} [327] => {{cite web | title = Mimer SQL, Built on Standards | work = Mimer SQL official website | publisher = Mimer Information Technology | year = 2009 | url = http://developer.mimer.com/features/feature_6.htm}} [328] => {{ cite book | first1 = Diana | last1 = Lorentz | first2 = Mary Beth | last2 = Roeser | first3 = Sundeep | last3 = Abraham | first4 = Angela | last4 = Amor | first5 = Geeta | last5 = Arora | first6 = Vikas | last6 = Arora | first7 = Lance | last7 = Ashdown | first8 = Hermann | last8 = Baer | first9 = Shrikanth | last9 = Bellamkonda | series = Oracle Database Documentation Library | publisher = Oracle USA, Inc | place = Redwood City, CA | title = Oracle Database SQL Language Reference 11g Release 2 (11.2) | chapter = Basic Elements of Oracle SQL: Data Types | orig-year = 1996 | date = October 2010 | access-date = December 29, 2010 | chapter-url = http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements001.htm#sthref154 | quote = For each DATE value, Oracle stores the following information: century, year, month, date, hour, minute, and second }} [329] => {{ cite book | first1 = Diana | last1 = Lorentz | first2 = Mary Beth | last2 = Roeser | first3 = Sundeep | last3 = Abraham | first4 = Angela | last4 = Amor | first5 = Geeta | last5 = Arora | first6 = Vikas | last6 = Arora | first7 = Lance | last7 = Ashdown | first8 = Hermann | last8 = Baer | first9 = Shrikanth | last9 = Bellamkonda | series = Oracle Database Documentation Library | publisher = Oracle USA, Inc | place = Redwood City, CA | title = Oracle Database SQL Language Reference 11g Release 2 (11.2) | chapter = Basic Elements of Oracle SQL: Data Types | orig-year = 1996 | date = October 2010 | access-date = December 29, 2010 | chapter-url = http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements001.htm#sthref154 | quote = The datetime data types are DATE... }} [330] => {{ cite book | first1 = Diana | last1 = Lorentz | first2 = Mary Beth | last2 = Roeser | first3 = Sundeep | last3 = Abraham | first4 = Angela | last4 = Amor | first5 = Geeta | last5 = Arora | first6 = Vikas | last6 = Arora | first7 = Lance | last7 = Ashdown | first8 = Hermann | last8 = Baer | first9 = Shrikanth | last9 = Bellamkonda | series = Oracle Database Documentation Library | publisher = Oracle USA, Inc | place = Redwood City, CA | title = Oracle Database SQL Language Reference 11g Release 2 (11.2) | chapter = Basic Elements of Oracle SQL: Data Types | orig-year = 1996 | date = October 2010 | access-date = December 29, 2010 | chapter-url = http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements001.htm#i54335 | quote = Do not define columns with the following SQL/DS and DB2 data types, because they have no corresponding Oracle data type:... TIME }} [331] => {{ cite book | chapter-url = http://special.lib.umn.edu/findaid/xml/cbi00168.xml | publisher = American National Standards Institute | title = X3H2 Records, 1978–95 | chapter = Finding Aid }} [332] => {{cite web | last = Doll | first = Shelley | title = Is SQL a Standard Anymore? | work = TechRepublic's Builder.com | publisher = TechRepublic | date = June 19, 2002 | url = http://articles.techrepublic.com.com/5100-10878_11-1046268.html | access-date = 2016-04-12 | archive-url = https://web.archive.org/web/20120705163024/http://www.techrepublic.com/article/is-sql-a-standard-anymore/1046268 | archive-date = 2012-07-05 }} [333] => {{cite web | last = Gillespie | first = Patrick | url = http://patorjk.com/blog/2012/01/26/pronouncing-sql-s-q-l-or-sequel/ | title = Pronouncing SQL: S-Q-L or Sequel? | access-date = 12 February 2012 }} [334] => {{cite book | title = Understanding the New SQL: A Complete Guide | last = Melton | first = Jim | author2 = Alan R Simon | year = 1993 | publisher = Morgan Kaufmann | isbn = 978-1-55860-245-8 | page = [https://archive.org/details/understandingnew00melt/page/536 536] | chapter = 1.2. What is SQL? | quote = SQL (correctly pronounced "ess cue ell," instead of the somewhat common "sequel")... | chapter-url-access = registration | chapter-url = https://archive.org/details/understandingnew00melt | url = https://archive.org/details/understandingnew00melt/page/536 }} [335] => {{ cite book | title = SQL/XML:2006 - Evaluierung der Standardkonformität ausgewählter Datenbanksysteme | last = Wagner | first = Michael | year = 2010 | publisher = Diplomica Verlag | isbn = 978-3-8366-9609-8 | page = 100 }} [336] => {{ cite web |date=July 2008 |title=SQL:2008 now an approved ISO international standard |publisher=Sybase |url=http://iablog.sybase.com/paulley/2008/07/sql2008-now-an-approved-iso-international-standard/ |url-status=dead |archive-url=https://web.archive.org/web/20110628130925/http://iablog.sybase.com/paulley/2008/07/sql2008-now-an-approved-iso-international-standard/ |archive-date=2011-06-28 }} [337] => {{ citation | url = http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt | format = text | title = SQL:1992 draft}} [338] => {{ citation | url = http://www.wiscorp.com/sql200n.zip | format = Zip | title = SQL:2008 draft | publisher = Whitemarsh Information Systems Corporation }} [339] => {{ citation | url = http://www.wiscorp.com/sql20nn.zip | format = Zip | title = SQL:2011 draft | publisher = Whitemarsh Information Systems Corporation }} [340] => {{ cite web | title = What's new in SQL:2011 | url = https://sigmodrecord.org/publications/sigmodRecord/1203/pdfs/10.industry.zemke.pdf | author = Fred Zemke |publisher=Oracle Corporation | year = 2012 }} [341] => [342] => {{ cite journal | title = Temporal features in SQL:2011 | url = http://cs.ulb.ac.be/public/_media/teaching/infoh415/tempfeaturessql2011.pdf | author = Krishna Kulkarni, Jan-Eike Michels |journal=SIGMOD Record | date = September 2012 |volume=41 |number=3 }} [343] => [344] => }} [345] => [346] => ==Sources== [347] => {{Refbegin}} [348] => * {{cite journal|last = Codd|first = Edgar F|date = June 1970|title = A Relational Model of Data for Large Shared Data Banks|journal = Communications of the ACM|volume = 13|issue = 6|pages = 377–87|doi = 10.1145/362384.362685|s2cid = 207549016|doi-access = free}} [349] => * [[c2:SqlFlaws|Discussion on alleged SQL flaws]] (C2 wiki) [350] => * [[C. J. Date]] with [[Hugh Darwen]]: ''A Guide to the SQL standard : a users guide to the standard database language SQL, 4th ed.'', Addison Wesley, USA 1997, {{ISBN|978-0-201-96426-4}} [351] => {{Refend}} [352] => [353] => ==External links== [354] => {{Sister project links [355] => |commons=Category:Structured Query Language [356] => |v=Introduction to SQL [357] => |b=Structured Query Language [358] => |n=no|s=no|q=no}} [359] => * [http://www.mcjones.org/System_R/SQL_Reunion_95/sqlr95.html ''1995 SQL Reunion: People, Projects, and Politics'', by Paul McJones (ed.)]: transcript of a reunion meeting devoted to the personal history of relational databases and SQL. [360] => * [http://special.lib.umn.edu/findaid/xml/cbi00168.xml American National Standards Institute. X3H2 Records, 1978–1995] [[Charles Babbage Institute]] Collection documents the H2 committee's development of the NDL and SQL standards. [361] => * [http://purl.umn.edu/107215 Oral history interview with Donald D. Chamberlin] [[Charles Babbage Institute]] In this oral history Chamberlin recounts his early life, his education at [[Harvey Mudd College]] and [[Stanford University]], and his work on relational database technology. Chamberlin was a member of the System R research team and, with [[Raymond F. Boyce]], developed the SQL database language. Chamberlin also briefly discusses his more recent research on XML query languages. [362] => [363] => [364] => {{SQL}} [365] => {{Navboxes|list= [366] => {{Databases}} [367] => {{Programming languages}} [368] => {{Query languages}} [369] => {{IBM}} [370] => {{ISO standards}} [371] => }} [372] => {{Authority control}} [373] => {{Portal bar|Computer programming}} [374] => [[Category:SQL| ]] [375] => [[Category:Articles with example SQL code]] [376] => [[Category:Data modeling languages]] [377] => [[Category:Declarative programming languages]] [378] => [[Category:Programming languages with an ISO standard]] [379] => [[Category:Query languages]] [380] => [[Category:Relational database management systems]] [381] => [[Category:Data-centric programming languages]] [382] => [[Category:Programming languages created in 1974]] [383] => [384] => [] => )
good wiki

SQL

SQL (Structured Query Language) is a standard programming language for managing and manipulating relational databases. It provides a set of instructions that allows users to query, insert, update, and delete data in a database.

More about us

About

It provides a set of instructions that allows users to query, insert, update, and delete data in a database. SQL is widely used in various industries and is considered the standard language for interacting with databases. The Wikipedia page on SQL provides comprehensive information about the language, including its origin, syntax, and usage. It covers the different types of SQL statements, such as SELECT, INSERT, UPDATE, and DELETE, and explains how these statements can be used to interact with the database. The page discusses key concepts like tables, columns, and rows, as well as primary keys, foreign keys, and indexes. Additionally, the page delves into the different versions and variations of SQL, including MySQL, PostgreSQL, Oracle, and Microsoft SQL Server. It highlights the differences and similarities among these implementations, as well as their features and strengths. The page also explores the history of SQL, its evolution, and its role in database management systems. Furthermore, the Wikipedia page on SQL provides information on advanced topics such as database normalization, transactions, and stored procedures. It discusses how SQL can be used in conjunction with other programming languages and frameworks, and provides examples of common SQL queries and operations. Overall, the Wikipedia page on SQL serves as a comprehensive resource for individuals seeking to gain a deeper understanding of the language and its applications in database management.

Expert Team

Vivamus eget neque lacus. Pellentesque egauris ex.

Award winning agency

Lorem ipsum, dolor sit amet consectetur elitorceat .

10 Year Exp.

Pellen tesque eget, mauris lorem iupsum neque lacus.