{"id":7662,"date":"2019-04-02T09:35:14","date_gmt":"2019-04-02T09:35:14","guid":{"rendered":"https:\/\/ittutorial.org\/?p=7662"},"modified":"2019-07-18T14:40:25","modified_gmt":"2019-07-18T14:40:25","slug":"oracle-sql-tutorials-chapter-1-3","status":"publish","type":"post","link":"https:\/\/ittutorial.org\/oracle-sql-tutorials-chapter-1-3\/","title":{"rendered":"Oracle SQL Tutorials &#8211; Chapter 1 (Part 3 of 3)"},"content":{"rendered":"<p><strong>ARITHMETIC OPERATORS<\/strong><\/p>\n<ul>\n<li>Arithmetic operations can be used on the data which type is \u2018date\u2019 or \u2018number\u2019.<\/li>\n<li>The priority of the operators is like below ;<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"126\" height=\"32\" class=\"wp-image-7668\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-146.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>USAGE OF THE ARITMETHIC OPERATORS<\/strong><\/p>\n<ul>\n<li>Let\u2019s list the name, surname, salary and the new salary which is increased by 5% ; and give alias to them.<\/li>\n<\/ul>\n<p><em>SELECT first_name NAME, last_name SURNAME , salary SALARY,(salary+salary*8\/100)as NEW_SALARY FROM hr.employees;<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"286\" height=\"151\" class=\"wp-image-7669\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-147.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>THE NULL VALUE<\/strong><\/p>\n<ul>\n<li>Null is a value that is unknown, unspecified or inconvenient.<\/li>\n<li>Null value is not zero(0) or whitespace. It is a common mistake.<\/li>\n<li>If a null value joins an arithmetic operation the result will be null.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>Let\u2019s list the name, surname, salary, and commission if it exist, with the aliases.<\/li>\n<\/ul>\n<p><em>SELECT first_name NAME, last_name SURNAME , salary SALARY, (salary*commission_pct)as COMMISSION FROM hr.employees;<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"285\" height=\"149\" class=\"wp-image-7670\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-148.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>THE CONCATENATION OPERATOR<\/strong><\/p>\n<ul>\n<li>It combines columns or character sets with other columns.<\/li>\n<li>It is represented as double pipe : ||<\/li>\n<li>It creates a columns which is character type.<\/li>\n<li>Also , CONCAT command can used to concetanation.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>Let\u2019s list the name, surname and salary with concatenation.<\/li>\n<\/ul>\n<p><em>SELECT first_name||&#8217; &#8216;||last_name AS &#8220;NAME SURNAME &#8220;,concat(&#8216;Salary : &#8216;,salary) &#8220;SALARY&#8221; FROM hr.employees;<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"209\" height=\"149\" class=\"wp-image-7671\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-149.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>REPEATING ROWS<\/strong><\/p>\n<ul>\n<li>The DISTINCT command is used to list the repeating rows just one time.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>Let\u2019s list all departments of the company.<\/li>\n<\/ul>\n<p><em>SELECT DISTINCT department_name FROM hr.departments;<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"132\" height=\"148\" class=\"wp-image-7672\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-150.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>VIEWING THE STRUCTURE OF TABLE<\/strong><\/p>\n<ul>\n<li>The DESCRIBE command is used to view the table structure.<\/li>\n<li>DESC[RIBE] table_name;<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>Let\u2019s list the structure of the hr.employees table.<\/li>\n<\/ul>\n<p><em>DESC hr.employees;<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"578\" height=\"228\" class=\"wp-image-7673\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-151.png\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-151.png 578w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-151-300x118.png 300w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>You can continue to read from this link ;<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"CWqJlgvJbA\"><p><a href=\"https:\/\/ittutorial.org\/oracle-sql-tutorials-chapter-2-1\/\">Oracle SQL Tutorials \u2013 Chapter 2 (Part 1 of 3)<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Oracle SQL Tutorials \u2013 Chapter 2 (Part 1 of 3)&#8221; &#8212; IT Tutorial\" src=\"https:\/\/ittutorial.org\/oracle-sql-tutorials-chapter-2-1\/embed\/#?secret=uLpg67JpfS#?secret=CWqJlgvJbA\" data-secret=\"CWqJlgvJbA\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ARITHMETIC OPERATORS Arithmetic operations can be used on the data which type is \u2018date\u2019 or \u2018number\u2019. The priority of the operators is like below ; &nbsp; USAGE OF THE ARITMETHIC OPERATORS Let\u2019s list the name, surname, salary and the new salary which is increased by 5% ; and give alias to them. SELECT first_name NAME, &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":[3051,3058,3060,3056,3061,3063,3059,3009,3048,3010,3053,1340,3001,3013,3014,1572,3049,3050,3003,3057,3055,3062,3017,3052,3016,3064,3000,3012,3054,3002,3008],"class_list":["post-7662","post","type-post","status-publish","format-standard","","category-oracle","category-oracle-sql","tag-arithmetic-operation","tag-concat-command","tag-concat-syntax","tag-concatenation","tag-distinct","tag-distinct-syntax","tag-how-to-concat","tag-how-to-write-sql","tag-learn-oracle","tag-learn-sql","tag-null-value","tag-oracle-sql","tag-oracle-sql-tutorial","tag-oracle-sql-tutorials","tag-rules-of-sql","tag-sql","tag-sql-arithemtic-operations","tag-sql-arithmetic-operators","tag-sql-commands","tag-sql-concat","tag-sql-concatenation","tag-sql-distinct","tag-sql-komutlari","tag-sql-null","tag-sql-ogren","tag-sql-structure-of-table","tag-sql-tutorial","tag-sql-tutorials","tag-what-is-null-value","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\/7662","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=7662"}],"version-history":[{"count":5,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/7662\/revisions"}],"predecessor-version":[{"id":10651,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/7662\/revisions\/10651"}],"wp:attachment":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media?parent=7662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/categories?post=7662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/tags?post=7662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}