{"id":7841,"date":"2019-04-04T12:52:36","date_gmt":"2019-04-04T12:52:36","guid":{"rendered":"https:\/\/ittutorial.org\/?p=7841"},"modified":"2019-07-18T14:41:32","modified_gmt":"2019-07-18T14:41:32","slug":"oracle-sql-tutorials-chapter-2-1","status":"publish","type":"post","link":"https:\/\/ittutorial.org\/oracle-sql-tutorials-chapter-2-1\/","title":{"rendered":"Oracle SQL Tutorials \u2013 Chapter 2 (Part 1 of 3)"},"content":{"rendered":"<p><strong>CHAPTER 2<\/strong><\/p>\n<ul>\n<li>WHERE Conditions<\/li>\n<li>Comparison operators<\/li>\n<li>BETWEEN operator<\/li>\n<li>IN operator<\/li>\n<li>LIKE operator<\/li>\n<li>IS NULL operator<\/li>\n<li>Logical operators<\/li>\n<li>AND operator<\/li>\n<li>OR operator<\/li>\n<li>NOT operator<\/li>\n<li>ORDER BY operator<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>RESTRICTING ROWS WITH WHERE<\/strong><\/p>\n<ul>\n<li>WHERE statement can be used to return only specific rows.<\/li>\n<li>WHERE statement must be written after the SELECT statement.<\/li>\n<li>The condition that defined in the WHERE statement, can include; values in column , literal values, arithemtic expressions or functions.<\/li>\n<li><em>SELECT *|{[DISTINCT] column|expression [alias],&#8230;} FROM table [WHERE condition(s)<\/em><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>Let\u2019s list the employees which department_ID are 80.<\/li>\n<\/ul>\n<pre>SELECT employee_id, first_name,last_name, job_id, department_id \r\nFROM hr.employees\r\nWHERE department_id=80;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"403\" height=\"150\" class=\"wp-image-7883\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-231.png\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-231.png 403w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-231-300x112.png 300w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>COMPARISON OPERATORS<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"250\" height=\"134\" class=\"wp-image-7884\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-232.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>Let\u2019s list the employees which salary is 3000 or less.<\/li>\n<\/ul>\n<pre>SELECT first_name,last_name, salary \r\nFROM hr.employees \r\nWHERE salary &lt;= 3000 ;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"211\" height=\"127\" class=\"wp-image-7885\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-233.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>IN OPERATOR<\/strong><\/p>\n<ul>\n<li>Let\u2019s list the employees which Manager_id is 100, 101 or 201.<\/li>\n<\/ul>\n<pre>SELECT employee_id, first_name,last_name, salary, manager_id \r\nFROM hr.employees \r\nWHERE manager_id IN (100, 101, 201) ;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"378\" height=\"170\" class=\"wp-image-7886\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-234.png\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-234.png 378w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-234-300x135.png 300w\" sizes=\"auto, (max-width: 378px) 100vw, 378px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>LIKE OPERATOR<\/strong><\/p>\n<ul>\n<li>Let\u2019s list the employees that has \u2018e\u2019 character in his\/her name.<\/li>\n<\/ul>\n<pre>SELECT first_name,last_name \r\nFROM hr.employees \r\nWHERE first_name LIKE '%e%' ;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"159\" height=\"150\" class=\"wp-image-7887\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-235.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>Let\u2019s list the employees that surname\u2019s second character is \u2018o\u2019.<\/li>\n<\/ul>\n<pre>SELECT first_name,last_name\r\nFROM hr.employees\r\nWHERE last_name LIKE '_o%' ;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"150\" class=\"wp-image-7888\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/04\/word-image-236.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>You can contunie to read from this link ;<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"tysuL76tyj\"><p><a href=\"https:\/\/ittutorial.org\/oracle-sql-tutorials-chapter-2-2\/\">Oracle SQL Tutorials \u2013 Chapter 2 (Part 2 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 2 of 3)&#8221; &#8212; IT Tutorial\" src=\"https:\/\/ittutorial.org\/oracle-sql-tutorials-chapter-2-2\/embed\/#?secret=NJ0m2BNunJ#?secret=tysuL76tyj\" data-secret=\"tysuL76tyj\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CHAPTER 2 WHERE Conditions Comparison operators BETWEEN operator IN operator LIKE operator IS NULL operator Logical operators AND operator OR operator NOT operator ORDER BY operator &nbsp; RESTRICTING ROWS WITH WHERE WHERE statement can be used to return only specific rows. WHERE statement must be written after the SELECT statement. The condition that defined in &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":[3009,3048,3010,1340,3001,3013,3014,1572,3003,3180,3181,3183,3184,3188,3017,3182,3185,3186,3187,3016,3179,3000,3012,3177,3002,3178,3008],"class_list":["post-7841","post","type-post","status-publish","format-standard","","category-oracle","category-oracle-sql","tag-how-to-write-sql","tag-learn-oracle","tag-learn-sql","tag-oracle-sql","tag-oracle-sql-tutorial","tag-oracle-sql-tutorials","tag-rules-of-sql","tag-sql","tag-sql-commands","tag-sql-equal","tag-sql-greater-than","tag-sql-in","tag-sql-in-operator","tag-sql-in-syntax","tag-sql-komutlari","tag-sql-less-than","tag-sql-like","tag-sql-like-operator","tag-sql-like-syntax","tag-sql-ogren","tag-sql-operators","tag-sql-tutorial","tag-sql-tutorials","tag-sql-where","tag-what-is-sql","tag-where-syntax","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\/7841","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=7841"}],"version-history":[{"count":6,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/7841\/revisions"}],"predecessor-version":[{"id":10652,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/7841\/revisions\/10652"}],"wp:attachment":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media?parent=7841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/categories?post=7841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/tags?post=7841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}