Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Sous-Interrogations Multi-colonne | SQL Oracle

1,259 views

Published on

Sous-Interrogations Multi-colonne | SQL Oracle. Telecharger cours dba oracle gratuit

Published in: Education
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • If you want to download or read this book, copy link or url below in the New tab ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • ..............ACCESS that WEBSITE Over for All Ebooks ................ ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THI5 BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Sous-Interrogations Multi-colonne | SQL Oracle

  1. 1. Copyright © Oracle Corporation, 1997. Tous droits réservés. 88 Sous-Interrogations Multi-colonne www.TelechargerCours.com
  2. 2. 8-2 Copyright © Oracle Corporation, 1997. Tous droits réservés. Objectifs A la fin de ce chapitre, vous saurez :A la fin de ce chapitre, vous saurez : • Ecrire une sous-interrogation multi- colonne • Décrire et expliquer le comportement des sous-interrogations lorsqu'elles trouvent des valeurs NULL • Ecrire une sous-interrogation dans une clause FROM www.TelechargerCours.com
  3. 3. 8-3 Copyright © Oracle Corporation, 1997. Tous droits réservés. Sous-Interrogations Multi-colonne Requête principale MANAGER 10 sous-interrogation SALESMAN 30 MANAGER 10 CLERK 20 La requêteLa requête principaleprincipale comparecompare MANAGER 10MANAGER 10 Valeurs d'une sous-interrogationValeurs d'une sous-interrogation multi-ligne et multi-colonnemulti-ligne et multi-colonne SALESMANSALESMAN 3030 MANAGERMANAGER 1010 CLERKCLERK 2020 auxaux www.TelechargerCours.com
  4. 4. 8-4 Copyright © Oracle Corporation, 1997. Tous droits réservés. syntaxe SELECT column, column, …. FROM table WHERE (column, column, ….) IN (SELECT column, column, …. FROM table WHERE condition); www.TelechargerCours.com
  5. 5. 8-5 Copyright © Oracle Corporation, 1997. Tous droits réservés. Utilisation des Sous- Interrogations Multi-colonne Afficher le nom, le numéro de département, leAfficher le nom, le numéro de département, le salaire et la commission de tout employé dont lesalaire et la commission de tout employé dont le salaire et la commission correspondentsalaire et la commission correspondent à la foisà la fois aux salaire et commission d'un des employé duaux salaire et commission d'un des employé du département 30.département 30. SQL> SELECT ename, deptno, sal, comm FROM emp WHERE (sal, NVL(comm,-1)) IN (SELECT sal, NVL(comm,-1) FROM emp WHERE deptno = 30);
  6. 6. 8-6 Copyright © Oracle Corporation, 1997. Tous droits réservés. Comparaison de Colonnes Par groupe de colonnes SAL COMM 1600 300 1250 500 1250 1400 2850 1500 0 950 Colonne par colonne SAL COMM 1600 300 1250 500 1250 1400 2850 1500 0 950 www.TelechargerCours.com
  7. 7. 8-7 Copyright © Oracle Corporation, 1997. Tous droits réservés. Sous-Interrogation avec Comparaison Colonne par Colonne SQL> SELECT ename, deptno, sal, comm 2 FROM emp 3 WHERE sal IN (SELECT sal 4 FROM emp 5 WHERE deptno = 30) 6 AND 7 NVL(comm,-1) IN (SELECT NVL(comm,-1) 8 FROM emp 9 WHERE deptno = 30); Afficher le nom, le n° de département, le salaireAfficher le nom, le n° de département, le salaire et la commission de tout employé dont leet la commission de tout employé dont le salaire et la commission correspondent ausalaire et la commission correspondent au salaire et à la commission d'un des employéssalaire et à la commission d'un des employés du département 30.du département 30.
  8. 8. 8-8 Copyright © Oracle Corporation, 1997. Tous droits réservés. Modification de la Table EMP • Supposons que le salaire et la commission de l'employé Clark soient modifiés. • Le salaire passe à $1500 et la commission à $300. ENAME SAL COMM ---------- --------- --------- ... CLARK 1500 300 ... ALLEN 1600 300 TURNER 1500 0 ... 14 rows selected. www.TelechargerCours.com
  9. 9. 8-9 Copyright © Oracle Corporation, 1997. Tous droits réservés. Comparaison par Groupe de Colonne SQL> SELECT ename, deptno, sal, comm 2 FROM emp 3 WHERE (sal, NVL(comm,-1)) IN 4 (SELECT sal, NVL(comm,-1) 5 FROM emp 6 WHERE deptno = 30); ENAME DEPTNO SAL COMM ---------- --------- --------- --------- JAMES 30 950 WARD 30 1250 500 MARTIN 30 1250 1400 TURNER 30 1500 0 ALLEN 30 1600 300 BLAKE 30 2850 6 rows selected. ENAME DEPTNO SAL COMM ---------- --------- --------- --------- JAMES 30 950 WARD 30 1250 500 MARTIN 30 1250 1400 TURNER 30 1500 0 ALLEN 30 1600 300 BLAKE 30 2850 6 rows selected.
  10. 10. 8-10 Copyright © Oracle Corporation, 1997. Tous droits réservés. SQL> SELECT ename,deptno, sal, comm 2 FROM emp 3 WHERE sal IN (SELECT sal 4 FROM emp 5 WHERE deptno = 30) 6 AND 7 NVL(comm,-1) IN (SELECT NVL(comm,-1) 8 FROM emp 9 WHERE deptno = 30); Comparaison Colonne par Colonne ENAME DEPTNO SAL COMM ---------- --------- --------- --------- JAMES 30 950 BLAKE 30 2850 TURNER 30 1500 0 CLARK 10 1500 300 ... 7 rows selected.
  11. 11. 8-11 Copyright © Oracle Corporation, 1997. Tous droits réservés. Valeurs NULL dans une Sous- Interrogation SQL> SELECT employee.ename 2 FROM emp employee 3 WHERE employee.empno NOT IN (SELECT manager.mgr FROM emp manager); no rows selected.no rows selected. www.TelechargerCours.com
  12. 12. 8-12 Copyright © Oracle Corporation, 1997. Tous droits réservés. Utilisation d'une Sous-intérogation dans la Clause FROM SQL> SELECT a.ename, a.sal, a.deptno, b.salavg 2 FROM emp a, (SELECT deptno, avg(sal) salavg 3 FROM emp 4 GROUP BY deptno) b 5 WHERE a.deptno = b.deptno 6 AND a.sal > b.salavg;
  13. 13. 8-13 Copyright © Oracle Corporation, 1997. Tous droits réservés. Résumé • Une sous-interrogation multi-colonne ramène plus d'une colonne. • Dans une sous-interrogation multi- colonne, les comparaisons de colonnes peuvent être effectuées par groupe de colonne ou colonne par colonne. • Une sous-interrogation multi-colonne peut également s'utiliser dans la clause FROM d'un ordre SELECT. www.TelechargerCours.com

×