{"id":587,"date":"2016-04-16T01:56:55","date_gmt":"2016-04-16T01:56:55","guid":{"rendered":"https:\/\/sqltutorial.org\/?page_id=587"},"modified":"2025-02-04T07:16:24","modified_gmt":"2025-02-04T14:16:24","slug":"what-is-sql","status":"publish","type":"page","link":"https:\/\/www.sqltutorial.org\/what-is-sql\/","title":{"rendered":"What Is SQL"},"content":{"rendered":"\r\n<p><strong>Summary<\/strong>: In this tutorial, you&#8217;ll understand the databases and SQL, the standard language for interacting with the databases.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id='introduction-to-databases'>Introduction to databases <a href=\"#introduction-to-databases\" class=\"anchor\" id=\"introduction-to-databases\" title=\"Anchor for Introduction to databases\">#<\/a><\/h2>\r\n\r\n\r\n\r\n<p>A database is a structured collection of data stored on a computer. It is a powerful tool for storing and organizing data efficiently.<\/p>\r\n\r\n\r\n\r\n<p>Today, you can find databases everywhere, from your smartphone to your computer to the online services you use.<\/p>\r\n\r\n\r\n\r\n<p>Here are some main features of databases:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>Efficient data storage<\/strong>: Databases offer a central location to store structured data such as sales, inventory, and finance.<\/li>\r\n\r\n\r\n\r\n<li><strong>Fast data retrieval<\/strong>: Databases allow you to access information quickly, much faster than reading data stored on spreadsheets and other flat files.<\/li>\r\n\r\n\r\n\r\n<li><strong>Efficient data management<\/strong>: Databases allow you to quickly insert, update, and delete data.<\/li>\r\n\r\n\r\n\r\n<li><strong>Data Sharing<\/strong>: Databases enable multiple users and applications to access the central information simultaneously.<\/li>\r\n\r\n\r\n\r\n<li><strong>Data analysis<\/strong>: Databases provide the structure to analyze the data and gain valuable insights.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>There are various types of databases; each has its specific use cases.<\/p>\r\n\r\n\r\n\r\n<p>Here are two common database types:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>Relational database management systems<\/strong> (<strong>RDBMS<\/strong>): This is the most common database type, organizing data into tables with rows and columns. The popular RDBMS are PostgreSQL, MySQL, MariaDB, Oracle Database, SQL Server, and IBM Db2.<\/li>\r\n\r\n\r\n\r\n<li><strong>Document databases<\/strong> (or NoSQL databases): These types of database stores data as documents. The popular document databases are MongoDB, Databricks, and Amazon DynamoDB.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>To interact with data in RDMBS, you need to use Structured Query Language or SQL, which is the central topic of this site.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id='overview-of-sql'>Overview of SQL <a href=\"#overview-of-sql\" class=\"anchor\" id=\"overview-of-sql\" title=\"Anchor for Overview of SQL\">#<\/a><\/h2>\r\n\r\n\r\n\r\n<p>SQL stands for the structured query language. SQL is pronounced as \/\u02c8\u025bs\u00a0kju\u02d0\u00a0\u02c8\u025bl\/ or \/\u02c8si\u02d0kw\u0259l\/.<\/p>\r\n\r\n\r\n\r\n<p>SQL is a standard language for interacting with RDBMS. It allows you to:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Create and maintain database structures such as tables.<\/li>\r\n\r\n\r\n\r\n<li>Insert, update, and delete data.<\/li>\r\n\r\n\r\n\r\n<li>Retrieve data from tables.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>SQL consists of three main parts:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Data definition language (DDL) deals with the database structure creation and modification. For example, CREATE TABLE, ALTER TABLE, and DROP TABLE statements.<\/li>\r\n\r\n\r\n\r\n<li>Data manipulation language (DML) provides statements to query data, such as the\u00a0<a href=\"https:\/\/www.sqltutorial.org\/sql-select\/\" target=\"_blank\" rel=\"noreferrer noopener\">SELECT<\/a> statement, and modify the data like <a href=\"https:\/\/www.sqltutorial.org\/sql-insert\/\" target=\"_blank\" rel=\"noreferrer noopener\">INSERT<\/a>,\u00a0<a href=\"https:\/\/www.sqltutorial.org\/sql-update\/\" target=\"_blank\" rel=\"noreferrer noopener\">UPDATE<\/a>, and\u00a0<a href=\"https:\/\/www.sqltutorial.org\/sql-delete\/\" target=\"_blank\" rel=\"noreferrer noopener\">DELETE<\/a> statements.<\/li>\r\n\r\n\r\n\r\n<li>Data control language (DCL) includes statements, working with user authorization and security, such as GRANT and REVOKE statements.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id='key-sql-concepts'>Key SQL concepts <a href=\"#key-sql-concepts\" class=\"anchor\" id=\"key-sql-concepts\" title=\"Anchor for Key SQL concepts\">#<\/a><\/h2>\r\n\r\n\r\n\r\n<p>The core of an RDBMS is tables. Tables allow you to organize data in rows and columns:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Columns: represent specific fields<\/li>\r\n\r\n\r\n\r\n<li>Rows: stores individual records.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>For example, an <code>employees<\/code> table has the <code>employe_id<\/code>, <code>first_name<\/code>, <code>last_name<\/code>, <code>email<\/code>, <code>phone_number<\/code>, &#8230; columns. It contains many rows, each representing an employee record.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id='sql-standards'>SQL Standards <a href=\"#sql-standards\" class=\"anchor\" id=\"sql-standards\" title=\"Anchor for SQL Standards\">#<\/a><\/h2>\r\n\r\n\r\n\r\n<p>SQL was one of the first commercial database languages since 1970. Since then, different database vendors implemented SQL in their products with some variations.<\/p>\r\n\r\n\r\n\r\n<p>The American Standards Institute (ANSI) published the first SQL standards in 1986 to bring greater vendor conformity. ANSI updated the SQL standard in 1992, SQL92, and SQL2, and again in 1999 as SQL99 and SQL3. Every time, ANSI added new features and commands into the SQL language.<\/p>\r\n\r\n\r\n\r\n<p>Today, ANSI and the International Standards Organization maintain SQL Standards as <strong>ISO\/IEC 9075 <\/strong>standard. The latest release standard is <strong>SQL:2023<\/strong>.<\/p>\r\n\r\n\r\n\r\n<p>The SQL Standards formalize SQL syntax structures and behaviors across database products. It becomes even more critical to open-source databases such as\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> and\u00a0<a href=\"https:\/\/www.pgtutorial.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">PostgreSQL<\/a>, where the RDBMS are developed mainly by the communities rather than big corporations.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id='sql-dialects%c2%a0'>SQL Dialects\u00a0 <a href=\"#sql-dialects%c2%a0\" class=\"anchor\" id=\"sql-dialects%c2%a0\" title=\"Anchor for SQL Dialects\u00a0\">#<\/a><\/h2>\r\n\r\n\r\n\r\n<p>SQL dialects are like English spoken by various English-speaking countries such as the UK, the US, and India.<\/p>\r\n\r\n\r\n\r\n<p>SQL dialects exist for the following reasons:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>Innovation<\/strong>: RDMBS vendors and communities continuously add new features to optimize their database products. SQL dialects allow them to provide unique features not part of SQL standards.<\/li>\r\n\r\n\r\n\r\n<li><strong>Performance<\/strong>: Dialects include statements that work well with a particular database, resulting in faster statement execution.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Here are some popular SQL dialects:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><a href=\"http:\/\/www.mysqltutorial.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> has the <a href=\"https:\/\/www.mysqltutorial.org\/mysql-stored-procedure\/\" target=\"_blank\" rel=\"noreferrer noopener\">procedural language<\/a> since version 5.<\/li>\r\n\r\n\r\n\r\n<li><a href=\"https:\/\/www.oracletutorial.com\/plsql-tutorial\/\" target=\"_blank\" rel=\"noreferrer noopener\">PL\/SQL<\/a>\u00a0stands for procedural language\/SQL. It is developed by Oracle for the\u00a0<a href=\"https:\/\/www.oracletutorial.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Oracle Database<\/a>.<\/li>\r\n\r\n\r\n\r\n<li><a href=\"https:\/\/www.sqlservertutorial.net\/\" target=\"_blank\" rel=\"noreferrer noopener\">Transact-SQL<\/a>\u00a0or T-SQL is developed by Microsoft for Microsoft SQL Server.<\/li>\r\n\r\n\r\n\r\n<li><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\"><a href=\"https:\/\/www.pgtutorial.com\/plpgsql\/\" target=\"_blank\" rel=\"noopener\">PL\/pgSQL<\/a> stands for Procedural Language\/PostgreSQL, which consists of SQL dialects and extensions implemented in PostgreSQL.<\/span><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>In each tutorial, we&#8217;ll explain the\u00a0<a href=\"https:\/\/www.sqltutorial.org\/sql-syntax\/\" target=\"_blank\" rel=\"noreferrer noopener\">SQL syntax<\/a>\u00a0structures and behaviors that are valid across the databases. We&#8217;ll also discuss the exceptions that may exist in specific databases.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id='quiz'>Quiz <a href=\"#quiz\" class=\"anchor\" id=\"quiz\" title=\"Anchor for Quiz\">#<\/a><\/h2>\r\n\r\n\r\n\r\n<p><iframe loading=\"lazy\" class=\"iframe\" src=\"\/quiz\/?quiz=what-is-sql\" name=\"quiz\" width=\"600\" height=\"700\"><\/iframe><\/p>\r\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful ?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"587\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqltutorial.org\/what-is-sql\/\"\n\t\t\t\tdata-post-title=\"What Is SQL\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"587\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqltutorial.org\/what-is-sql\/\"\n\t\t\t\tdata-post-title=\"What Is SQL\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial introduces you to the SQL language, discuss standard SQL and some popular SQL dialects.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-587","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is SQL<\/title>\n<meta name=\"description\" content=\"In this tutorial, you&#039;ll understand the databases and SQL, the standard language for interacting with databases.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqltutorial.org\/what-is-sql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is SQL\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you&#039;ll understand the databases and SQL, the standard language for interacting with databases.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqltutorial.org\/what-is-sql\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-04T14:16:24+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqltutorial.org\/what-is-sql\/\",\"url\":\"https:\/\/www.sqltutorial.org\/what-is-sql\/\",\"name\":\"What is SQL\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqltutorial.org\/#website\"},\"datePublished\":\"2016-04-16T01:56:55+00:00\",\"dateModified\":\"2025-02-04T14:16:24+00:00\",\"description\":\"In this tutorial, you'll understand the databases and SQL, the standard language for interacting with databases.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.sqltutorial.org\/what-is-sql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqltutorial.org\/what-is-sql\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqltutorial.org\/what-is-sql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqltutorial.org\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What Is SQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqltutorial.org\/#website\",\"url\":\"https:\/\/www.sqltutorial.org\/\",\"name\":\"SQL Tutorial\",\"description\":\"An Interactive SQL Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqltutorial.org\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is SQL","description":"In this tutorial, you'll understand the databases and SQL, the standard language for interacting with databases.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqltutorial.org\/what-is-sql\/","og_locale":"en_US","og_type":"article","og_title":"What is SQL","og_description":"In this tutorial, you'll understand the databases and SQL, the standard language for interacting with databases.","og_url":"https:\/\/www.sqltutorial.org\/what-is-sql\/","og_site_name":"SQL Tutorial","article_modified_time":"2025-02-04T14:16:24+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqltutorial.org\/what-is-sql\/","url":"https:\/\/www.sqltutorial.org\/what-is-sql\/","name":"What is SQL","isPartOf":{"@id":"https:\/\/www.sqltutorial.org\/#website"},"datePublished":"2016-04-16T01:56:55+00:00","dateModified":"2025-02-04T14:16:24+00:00","description":"In this tutorial, you'll understand the databases and SQL, the standard language for interacting with databases.","breadcrumb":{"@id":"https:\/\/www.sqltutorial.org\/what-is-sql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqltutorial.org\/what-is-sql\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqltutorial.org\/what-is-sql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqltutorial.org\/"},{"@type":"ListItem","position":2,"name":"What Is SQL"}]},{"@type":"WebSite","@id":"https:\/\/www.sqltutorial.org\/#website","url":"https:\/\/www.sqltutorial.org\/","name":"SQL Tutorial","description":"An Interactive SQL Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqltutorial.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.sqltutorial.org\/wp-json\/wp\/v2\/pages\/587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqltutorial.org\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.sqltutorial.org\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqltutorial.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqltutorial.org\/wp-json\/wp\/v2\/comments?post=587"}],"version-history":[{"count":0,"href":"https:\/\/www.sqltutorial.org\/wp-json\/wp\/v2\/pages\/587\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqltutorial.org\/wp-json\/wp\/v2\/media?parent=587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}