{"id":3343,"date":"2019-03-25T17:43:50","date_gmt":"2019-03-25T20:43:50","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/structure-query-language-sql-chapter-6-sql-commands\/"},"modified":"2020-02-12T15:49:55","modified_gmt":"2020-02-12T18:49:55","slug":"structure-query-language-sql-chapter-6-sql-commands","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/","title":{"rendered":"Structure Query Language (SQL): Chapter 6 &#8211; SQL Commands."},"content":{"rendered":"<div align=\"justify\">\n<p>This article illustrates a few SQL commands. To illustrate how they are used, the following tables will work as reference:<\/p>\n<p><b>Store_Information<\/b> table:<\/p>\n<p><b>Store_Name\u00a0\u00a0\u00a0 Sales\u00a0\u00a0\u00a0 Date_Time<\/b><br \/>\nLos Angeles\u00a0\u00a0\u00a0 1500 \u00a0\u00a0\u00a0 05-Jan-1999<br \/>\nSan Diego\u00a0\u00a0 \u00a0 \u00a0 \u00a0 250 \u00a0\u00a0\u00a0 07-Jan-1999<br \/>\nLos Angeles\u00a0\u00a0 \u00a0\u00a0 300 \u00a0\u00a0\u00a0 08-Jan-1999<br \/>\nBoston\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 700 \u00a0\u00a0\u00a0 08-Jan-1999<\/p>\n<p><b>Internet_Sales<\/b> table:<\/p>\n<p><b>Date_Time\u00a0\u00a0\u00a0 Sales<\/b><br \/>\n07-Jan-1999\u00a0\u00a0\u00a0 250<br \/>\n10-Jan-1999\u00a0\u00a0\u00a0 535<br \/>\n11-Jan-1999\u00a0\u00a0\u00a0 320<br \/>\n12-Jan-1999\u00a0\u00a0\u00a0 750<\/p>\n<p><b>Commands used for creating and inserting data in tables: <\/b><br \/>\n<b><br \/>\nStore_Information<\/b> table:<\/p>\n<p><span style=\"font-family: Courier New;\"><span style=\"color: #0000ff;\">CREATE TABLE<\/span> <span style=\"color: #339966;\">Store_Information<\/span>(<br \/>\n<span style=\"color: #339966;\">Store_Name<\/span> <span style=\"color: #0000ff;\">varchar<\/span>(20) not null,<br \/>\n<span style=\"color: #339966;\">Sales <\/span><span style=\"color: #0000ff;\">int <\/span>not null,<br \/>\n<span style=\"color: #339966;\">Date_Time<\/span> <span style=\"color: #0000ff;\">date <\/span>not null<br \/>\n)<\/span><\/p>\n<p><span style=\"color: #0000ff;\">INSERT <\/span><span style=\"color: #339966;\">Store_Information<\/span><br \/>\n<span style=\"color: #0000ff;\">VALUES<\/span><br \/>\n(<span style=\"color: #ff0000;\">&#8216;Los Angeles&#8217;<\/span>, 1500, <span style=\"color: #ff0000;\">&#8217;05-Jan-1999&#8242;<\/span>),<br \/>\n(<span style=\"color: #ff0000;\">&#8216;San Diego&#8217;<\/span>, 250 , <span style=\"color: #ff0000;\">&#8217;07-Jan-1999&#8242;<\/span>),<br \/>\n(<span style=\"color: #ff0000;\">&#8216;Los Angeles&#8217;<\/span>, 300, <span style=\"color: #ff0000;\">&#8217;08-Jan-1999&#8242;<\/span>),<br \/>\n(<span style=\"color: #ff0000;\">&#8216;Boston&#8217;<\/span>, 700, <span style=\"color: #ff0000;\">&#8217;08-Jan-1999&#8242;<\/span>)<br \/>\n<span style=\"color: #0000ff;\">GO<\/span><\/p>\n<p><b>Internet_Sales<\/b> table:<\/p>\n<p><span style=\"font-family: Courier New;\"><span style=\"color: #0000ff;\">CREATE TABLE<\/span> <span style=\"color: #339966;\">Internet_Sales<\/span>(<br \/>\n<span style=\"color: #339966;\">Date_Time<\/span> <span style=\"color: #0000ff;\">date <\/span>not null,<br \/>\n<span style=\"color: #339966;\">Sales <\/span><span style=\"color: #0000ff;\">int <\/span>not null<br \/>\n)<\/span><\/p>\n<p><span style=\"color: #0000ff;\">INSERT <\/span><span style=\"color: #339966;\">Internet_Sales<\/span><br \/>\n<span style=\"color: #0000ff;\">VALUES<\/span><br \/>\n(<span style=\"color: #ff0000;\">&#8217;07-Jan-1999&#8242;<\/span>, 250),<br \/>\n(<span style=\"color: #ff0000;\">&#8217;10-Jan-1999&#8242;<\/span>, 535),<br \/>\n(<span style=\"color: #ff0000;\">&#8217;11-Jan-1999&#8242;<\/span>, 320),<br \/>\n(<span style=\"color: #ff0000;\">&#8217;12-Jan-1999&#8242;<\/span>, 750)<br \/>\n<span style=\"color: #0000ff;\">GO<\/span><\/p>\n<p><b>1. WHERE<\/b><\/p>\n<p>This clause works with other SQL clauses to specify a search condition for the statements in a table. The example below selects all stores whose sales are higher than 1000. The syntax is:<\/p>\n<p><span style=\"font-family: Courier New;\"><b>SELECT &#8220;column_name&#8221;<br \/>\nFROM &#8220;table_name&#8221;<br \/>\nWHERE &#8220;condition&#8221;<\/b><\/span><\/p>\n<p>Example:<\/p>\n<p><span style=\"font-family: Courier New;\"><span style=\"color: #0000ff;\">SELECT <\/span><span style=\"color: #339966;\">Store_Name<\/span><br \/>\n<span style=\"color: #0000ff;\">FROM <\/span><span style=\"color: #339966;\">Store_Information<\/span><br \/>\n<span style=\"color: #0000ff;\">WHERE <\/span><span style=\"color: #339966;\">Sales > 1000<\/span><\/span><\/p>\n<p>Result:<\/p>\n<p><span style=\"font-family: Courier New;\"><u>Store_Name<\/u><br \/>\nLos Angeles<\/span><\/p>\n<p><b>2. HAVING<\/b><\/p>\n<p>This clause limits the result\u00a0 based on the respective sum (or on any other function that has been added). In the example below, a clause will be inserted to return only stores whose sales are higher than 1500. The difference between <span style=\"font-family: Courier New;\">WHERE <\/span>and <span style=\"font-family: Courier New;\">HAVING\u00a0 <\/span>clauses is that the <span style=\"font-family: Courier New;\">WHERE <\/span>clause condition is tested against each and every row of data, while the <span style=\"font-family: Courier New;\">HAVING <\/span>clause is tested against the groups.<br \/>\nSyntax:<\/p>\n<p><b><span style=\"font-family: Courier New;\">SELECT &#8220;column1&#8221;, SUM(&#8220;column2&#8221;)<br \/>\nFROM &#8220;table_name&#8221;<br \/>\nGROUP BY &#8220;column1&#8221;<br \/>\nHAVING (arithmetic function&#8217;s condition) <\/span><\/b><\/p>\n<p>Example:<\/p>\n<p><span style=\"font-family: Courier New;\"><span style=\"color: #0000ff;\">SELECT <\/span><span style=\"color: #339966;\">Store_Name<\/span>, SUM<span style=\"color: #0000ff;\">(sales)<\/span><br \/>\n<span style=\"color: #0000ff;\">FROM <\/span><span style=\"color: #339966;\">Store_Information<\/span><br \/>\n<span style=\"color: #0000ff;\">GROUP BY<\/span> <span style=\"color: #339966;\">store_name<\/span><br \/>\n<span style=\"color: #0000ff;\">HAVING SUM(<\/span><span style=\"color: #339966;\">sales<\/span><span style=\"color: #0000ff;\">) ><\/span> 1500<\/span><\/p>\n<p>Result:<br \/>\n<u><br \/>\n<\/u><span style=\"font-family: Courier New;\"><u>Store_name\u00a0\u00a0\u00a0 SUM(Sales)<\/u><br \/>\nLos Angeles\u00a0\u00a0\u00a0 1800<\/span><\/p>\n<p><b>3. DISTINCT<\/b><\/p>\n<p>The <span style=\"font-family: Courier New;\">SELECT <\/span>clause works in conjunction with the <span style=\"font-family: Courier New;\">SELECT <\/span>clause and selects only distinct (unique) data from a database table(s). The syntax is:<\/p>\n<p><b><span style=\"font-family: Courier New;\">SELECT DISTINCT &#8220;column_name&#8221;<br \/>\nFROM &#8220;table_name&#8221;<\/span><\/b><\/p>\n<p>Example:<\/p>\n<p><span style=\"font-family: Courier New;\"><span style=\"color: #0000ff;\">SELECT DISTINCT<\/span> <span style=\"color: #339966;\">Store_Name<\/span> <span style=\"color: #0000ff;\">FROM <\/span><span style=\"color: #339966;\">Store_Information<\/span><\/span><span style=\"color: #339966;\"><br \/>\n<\/span><br \/>\nResult:<\/p>\n<p><span style=\"font-family: Courier New;\"><u>Store_Name<\/u><br \/>\nLos Angeles<br \/>\nSan Diego<br \/>\nBoston<\/span><\/p>\n<p><b>4. FUNCTIONS <\/b><\/p>\n<p>SQL aggregate functions are used to um, count, get the average, get the minimum, and get the maximum values from a column or from a sub-set of column values. The arithmetic functions are: <span style=\"font-family: Courier New;\">AVG<\/span>, <span style=\"font-family: Courier New;\">COUNT<\/span>, <span style=\"font-family: Courier New;\">MAX<\/span>, <span style=\"font-family: Courier New;\">MIN<\/span>, and <span style=\"font-family: Courier New;\">SUM<\/span>.<\/p>\n<p>For functions, use the following syntax:<br \/>\n<b><span style=\"font-family: Courier New;\"><br \/>\nSELECT &#8220;function type&#8221;(&#8220;column_name&#8221;)<br \/>\nFROM &#8220;table_name&#8221;<\/span><\/b><\/p>\n<p>Example:<\/p>\n<p><span style=\"font-family: Courier New;\"><span style=\"color: #0000ff;\">SELECT <\/span><span style=\"color: #ff00ff;\">SUM<\/span><span style=\"color: #0000ff;\">(<\/span><span style=\"color: #339966;\">Sales<\/span><span style=\"color: #0000ff;\">) FROM <\/span><span style=\"color: #339966;\">Store_Information<\/span><\/span><\/p>\n<p>Result:<br \/>\n<span style=\"font-family: Courier New;\"><br \/>\n<u>SUM(Sales)<\/u><br \/>\n2750 <\/span><\/p>\n<p><b>5. JOIN<\/b><\/p>\n<p>The <span style=\"font-family: Courier New;\">JOIN <\/span>clause selects data from two or more tables tied together by matching table columns. Example:<br \/>\n<b><span style=\"font-family: Courier New;\"><br \/>\nSELECT * FROM Table1<br \/>\nJOIN Table2<br \/>\nON Table1.Field = Table2.Field<\/span><\/b><\/p>\n<p><b>6. UNION<\/b><\/p>\n<p>The UNION clause merges the results of two or more queries into one result set. It&#8217;s similar to JOIN, since both are used to merge information from multiple tables. However, with UNION the corresponding tables must have the same structure (data type). The syntax is:<br \/>\n<b><span style=\"font-family: Courier New;\"><br \/>\n[Instruction SQL 1]<br \/>\nUNION<br \/>\n[Instruction SQL 2]<\/span><\/b><\/p>\n<p>The example below merges all data recorded in both tables:<\/p>\n<p><span style=\"font-family: Courier New;\"><span style=\"color: #0000ff;\">SELECT <\/span><span style=\"color: #339966;\">Date_Time<\/span> <span style=\"color: #0000ff;\">FROM <\/span><span style=\"color: #339966;\">Store_Information<\/span><br \/>\n<span style=\"color: #0000ff;\">UNION<\/span><br \/>\n<span style=\"color: #0000ff;\">SELECT <\/span><span style=\"color: #339966;\">Date_Time<\/span> <span style=\"color: #0000ff;\">FROM <\/span><span style=\"color: #339966;\">Internet_Sales<\/span><\/span><\/p>\n<p>Result:<\/p>\n<p><span style=\"font-family: Courier New;\"><u>Date_Time<\/u><br \/>\n05-Jan-1999<br \/>\n07-Jan-1999<br \/>\n08-Jan-1999<br \/>\n10-Jan-1999<br \/>\n11-Jan-1999<br \/>\n12-Jan-1999<\/span><\/p>\n<p><b><br \/>\n7. UNION ALL<\/b><\/p>\n<p>The <span style=\"font-family: Courier New;\">UNION ALL <\/span>clause merges the results of two or more queries into one result set. It works similarly to <span style=\"font-family: Courier New;\">UNION <\/span>clause; however, when using <span style=\"font-family: Courier New;\">UNION<\/span>, the duplicated rows are removed from the result set, and when using <span style=\"font-family: Courier New;\">UNION ALL<\/span>, all rows are returned, including the duplicated ones.<\/p>\n<p><b><span style=\"font-family: Courier New;\">[Instruction SQL 1]<br \/>\nUNION ALL<br \/>\n[Instruction SQL 2]<\/span><\/b><\/p>\n<p>Example:<\/p>\n<p><span style=\"font-family: Courier New;\"><span style=\"color: #0000ff;\">SELECT <\/span><span style=\"color: #339966;\">Date_Time<\/span> <span style=\"color: #0000ff;\">FROM <\/span><span style=\"color: #339966;\">Store_Information<\/span><br \/>\n<span style=\"color: #0000ff;\">UNION ALL <\/span><br \/>\n<span style=\"color: #0000ff;\">SELECT <\/span><span style=\"color: #339966;\">Date_Time<\/span> <span style=\"color: #0000ff;\">FROM <\/span><span style=\"color: #339966;\">Internet_Sales<\/span><br \/>\n<\/span><br \/>\nResult:<\/p>\n<p><span style=\"font-family: Courier New;\"><u>Date_Time<\/u><br \/>\n05-Jan-1999<br \/>\n07-Jan-1999<br \/>\n08-Jan-1999<br \/>\n08-Jan-1999<br \/>\n07-Jan-1999<br \/>\n10-Jan-1999<br \/>\n11-Jan-1999<br \/>\n12-Jan-1999<\/span><\/p>\n<\/div>\n<div align=\"justify\"><\/div>\n<div align=\"justify\">\n<h3>Related Articles<\/h3>\n<hr \/>\n<ul>\n<li><a href=\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-1-manipulating-information-in-the-db\/\">Structure Query Language (SQL): Chapter 1 &#8211; Manipulating information in the DB.<\/a><\/li>\n<li><a href=\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-2-sql-server-databases-files-and-logs\/\">Structure Query Language (SQL): Chapter 2 &#8211; SQL Server Database&#8217;s Files and Logs.<\/a><\/li>\n<li><a href=\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-3-data-discard-and-db-limits\/\">Structure Query Language (SQL): Chapter 3 &#8211; Data Discard and DB Limits.<\/a><\/li>\n<li><a href=\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-4-backup\/\">Structure Query Language (SQL): Chapter 4 &#8211; Backup.<\/a><\/li>\n<li><a href=\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-5-best-practices-for-setting-up-historics-and-queries\/\">Structure Query Language (SQL): Chapter 5 &#8211; Best practices for setting up Historics and Queries.<\/a><\/li>\n<li><a href=\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/\">Structure Query Language (SQL): Chapter 6 &#8211; SQL Commands.<\/a><\/li>\n<li><a href=\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-7-views\/\">Structure Query Language (SQL): Chapter 7 &#8211; Views.<\/a><\/li>\n<li><a href=\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-8-triggers\/\">Structure Query Language (SQL): Chapter 8 &#8211; Triggers.<\/a><\/li>\n<li><a href=\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-9-stored-procedures\/\">Structure Query Language (SQL): Chapter 9 &#8211; Stored Procedures.<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This article illustrates a few SQL commands. To illustrate how they are used, the following tables will work as reference: Store_Information table: Store_Name\u00a0\u00a0\u00a0 Sales\u00a0\u00a0\u00a0 Date_Time Los Angeles\u00a0\u00a0\u00a0 1500 \u00a0\u00a0\u00a0 05-Jan-1999&hellip;<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[735],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Structure Query Language (SQL): Chapter 6 - Structure Query Language (SQL): Chapter 6 - SQL Commands.[:] - Elipse Knowledgebase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Structure Query Language (SQL): Chapter 6 - SQL Commands.\" \/>\n<meta property=\"og:description\" content=\"This article illustrates a few SQL commands. To illustrate how they are used, the following tables will work as reference: Store_Information table: Store_Name\u00a0\u00a0\u00a0 Sales\u00a0\u00a0\u00a0 Date_Time Los Angeles\u00a0\u00a0\u00a0 1500 \u00a0\u00a0\u00a0 05-Jan-1999&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"Elipse Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/elipsesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T20:43:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-12T18:49:55+00:00\" \/>\n<meta name=\"author\" content=\"D\u00e9lio Damin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"D\u00e9lio Damin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/\"},\"author\":{\"name\":\"D\u00e9lio Damin\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778\"},\"headline\":\"Structure Query Language (SQL): Chapter 6 &#8211; SQL Commands.\",\"datePublished\":\"2019-03-25T20:43:50+00:00\",\"dateModified\":\"2020-02-12T18:49:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/\"},\"wordCount\":1352,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"DataBases\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/\",\"name\":\"[:pt]Structure Query Language (SQL): Chapter 6 - SQL Commands.[:en]Structure Query Language (SQL): Chapter 6 - SQL Commands.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:43:50+00:00\",\"dateModified\":\"2020-02-12T18:49:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Structure Query Language (SQL): Chapter 6 &#8211; SQL Commands.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.elipse.com.br\/#website\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"name\":\"Elipse Knowledgebase\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.elipse.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\",\"name\":\"Elipse Software\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"sameAs\":[\"http:\/\/www.facebook.com\/elipsesoftware\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"contentUrl\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"width\":161,\"height\":58,\"caption\":\"Elipse Software\"},\"image\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778\",\"name\":\"D\u00e9lio Damin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g\",\"caption\":\"D\u00e9lio Damin\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/delio\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Structure Query Language (SQL): Chapter 6 - Structure Query Language (SQL): Chapter 6 - SQL Commands.[:] - Elipse Knowledgebase","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:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]Structure Query Language (SQL): Chapter 6 - SQL Commands.[:en]Structure Query Language (SQL): Chapter 6 - SQL Commands.[:] - Elipse Knowledgebase","og_description":"This article illustrates a few SQL commands. To illustrate how they are used, the following tables will work as reference: Store_Information table: Store_Name\u00a0\u00a0\u00a0 Sales\u00a0\u00a0\u00a0 Date_Time Los Angeles\u00a0\u00a0\u00a0 1500 \u00a0\u00a0\u00a0 05-Jan-1999&hellip;","og_url":"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:43:50+00:00","article_modified_time":"2020-02-12T18:49:55+00:00","author":"D\u00e9lio Damin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"D\u00e9lio Damin","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/"},"author":{"name":"D\u00e9lio Damin","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778"},"headline":"Structure Query Language (SQL): Chapter 6 &#8211; SQL Commands.","datePublished":"2019-03-25T20:43:50+00:00","dateModified":"2020-02-12T18:49:55+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/"},"wordCount":1352,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["DataBases"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/","url":"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/","name":"[:pt]Structure Query Language (SQL): Chapter 6 - SQL Commands.[:en]Structure Query Language (SQL): Chapter 6 - SQL Commands.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:43:50+00:00","dateModified":"2020-02-12T18:49:55+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/structure-query-language-sql-chapter-6-sql-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"Structure Query Language (SQL): Chapter 6 &#8211; SQL Commands."}]},{"@type":"WebSite","@id":"https:\/\/kb.elipse.com.br\/#website","url":"https:\/\/kb.elipse.com.br\/","name":"Elipse Knowledgebase","description":"","publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.elipse.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.elipse.com.br\/#organization","name":"Elipse Software","url":"https:\/\/kb.elipse.com.br\/","sameAs":["http:\/\/www.facebook.com\/elipsesoftware"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/","url":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","contentUrl":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","width":161,"height":58,"caption":"Elipse Software"},"image":{"@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778","name":"D\u00e9lio Damin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g","caption":"D\u00e9lio Damin"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/delio\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3343"}],"collection":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=3343"}],"version-history":[{"count":3,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3343\/revisions"}],"predecessor-version":[{"id":10172,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3343\/revisions\/10172"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=3343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=3343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=3343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}