{"id":7615,"date":"2019-04-02T09:00:43","date_gmt":"2019-04-02T09:00:43","guid":{"rendered":"https:\/\/ittutorial.org\/?p=7615"},"modified":"2019-07-18T14:39:59","modified_gmt":"2019-07-18T14:39:59","slug":"oracle-sql-tutorials-chapter-1-2","status":"publish","type":"post","link":"https:\/\/ittutorial.org\/oracle-sql-tutorials-chapter-1-2\/","title":{"rendered":"Oracle SQL Tutorials &#8211; Chapter 1 (Part 2 of 3)"},"content":{"rendered":"<p><strong>SELECT Statement<\/strong><\/p>\n<ul>\n<li><strong><em>Selection : <\/em><\/strong>SQL statements are being used to returning the selected lines from related tables.<\/li>\n<li><strong><em>Projection : <\/em><\/strong>SQL\u2019s projection ability is being used to returning the selected columns from related tables.<\/li>\n<li><strong><em>Join :<\/em><\/strong> SQL\u2019s join ability is being used to display selected data from two diffirent tables in one table.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>SELECT STATEMENT SYNTAX<\/strong><\/p>\n<ul>\n<li><em>SELECT *|{[DISTINCT] column|expression [alias],&#8230;} FROM table;<\/em><\/li>\n<li><strong><em>SELECT : <\/em><\/strong>Determines which columns are displayed.<\/li>\n<li><strong><em>FROM <\/em><\/strong>: Identifies tables with specified columns<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>ORALCE HR SCHEMA &amp; TABLES<\/strong><\/p>\n<ul>\n<li>In this document, tables of the Oracle HR (Human Resources) Schema will be used as example.If you check \u2018add sample schema\u2019 box while creating database, this schema will be added your database as sample schema.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"438\" height=\"327\" class=\"wp-image-7617\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/hr-schema-oracle-ile-ilgili-garsel-sonucu-1.gif\" alt=\"hr schema oracle ile ilgili g\u00c3\u00b6rsel sonucu\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>SELECT ALL COLUMNS OF A TABLE<\/strong><\/p>\n<ul>\n<li>Let\u2019s list all the employees.<\/li>\n<\/ul>\n<p><em>SELECT * FROM hr.employees;<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"918\" height=\"149\" class=\"wp-image-7618\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-134.png\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-134.png 918w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-134-300x49.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-134-768x125.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>SELECT SPECIFIED COLUMNS OF A TABLE<\/strong><\/p>\n<ul>\n<li>Let\u2019s list name, surname, salary and hire date of all employees.<\/li>\n<\/ul>\n<p><em>SELECT first_name, last_name, salary, hire_date FROM hr.employees;<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"281\" height=\"148\" class=\"wp-image-7619\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-135.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>GIVE ALIAS TO COLUMNS<\/strong><\/p>\n<ul>\n<li>Aliases allow to rename the column.<\/li>\n<li>Calculations get easier.<\/li>\n<li>It\u2019s written after the column name.<\/li>\n<li>\u2018AS\u2019 statement can be written between column name and alias.<\/li>\n<li>If the alias contains special characters like \u201c %, $, # \u201d, it must be written between double quotes.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>Let\u2019s list the name, surname, salary and hire date of the employees with the aliases.<\/li>\n<\/ul>\n<p><em>SELECT first_name NAME, last_name SURNAME , salary &#8220;SALARY&#8221;,hire_date as \u201cHire Date\u201d FROM hr.employees;<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"271\" height=\"150\" class=\"wp-image-7620\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-136.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>You can continue to read from this link ;<\/p>\n<p>https:\/\/ittutorial.org\/2019\/04\/02\/oracle-sql-tutorials-chapter-1-3\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SELECT Statement Selection : SQL statements are being used to returning the selected lines from related tables. Projection : SQL\u2019s projection ability is being used to returning the selected columns from related tables. Join : SQL\u2019s join ability is being used to display selected data from two diffirent tables in one table. &nbsp; SELECT STATEMENT &hellip;<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1994,3019],"tags":[3027,3034,3009,3011,3010,1340,3001,3013,3014,3021,3024,3028,3023,3032,1572,3031,3029,3035,3003,3017,3015,3016,3022,3025,3030,3033,3026,3000,3012,3002,3008],"class_list":["post-7615","post","type-post","status-publish","format-standard","","category-oracle","category-oracle-sql","tag-alias","tag-alias-syntax","tag-how-to-write-sql","tag-learn-oracle-sql","tag-learn-sql","tag-oracle-sql","tag-oracle-sql-tutorial","tag-oracle-sql-tutorials","tag-rules-of-sql","tag-select","tag-select-from","tag-select-from-where","tag-select-statement","tag-select-syntax","tag-sql","tag-sql-alias","tag-sql-alias-kullanimi","tag-sql-alias-syntax","tag-sql-commands","tag-sql-komutlari","tag-sql-nedir","tag-sql-ogren","tag-sql-select","tag-sql-select-from","tag-sql-select-kullanimi","tag-sql-select-syntax","tag-sql-sorgu","tag-sql-tutorial","tag-sql-tutorials","tag-what-is-sql","tag-writing-sql"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/7615","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/comments?post=7615"}],"version-history":[{"count":5,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/7615\/revisions"}],"predecessor-version":[{"id":10581,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/7615\/revisions\/10581"}],"wp:attachment":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media?parent=7615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/categories?post=7615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/tags?post=7615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}