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.

L'Ordre SELECT Élémentaire | SQL Oracle

2,121 views

Published on

L'Ordre SELECT Élémentaire | SQL Oracle.

Published in: Education
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS 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 THIS 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 THIS 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 THIS 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 THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... 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
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... 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
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... 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
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://shorturl.at/krvUW } ......................................................................................................................... Download Full EPUB Ebook here { http://shorturl.at/krvUW } ......................................................................................................................... Download Full doc Ebook here { http://shorturl.at/krvUW } ......................................................................................................................... Download PDF EBOOK here { http://shorturl.at/krvUW } ......................................................................................................................... Download EPUB Ebook here { http://shorturl.at/krvUW } ......................................................................................................................... Download doc Ebook here { http://shorturl.at/krvUW } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS 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 THIS 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 THIS 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 THIS 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 THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

L'Ordre SELECT Élémentaire | SQL Oracle

  1. 1. Copyright © Oracle Corporation, 1998. Tous droits réservés. 11 www.TelechargerCours.com L'Ordre SELECT Élémentaire www.TelechargerCours.com
  2. 2. 1-2 Copyright © Oracle Corporation, 1998. Tous droits réservés. A la fin de ce chapitre, vous saurez :A la fin de ce chapitre, vous saurez : • Énumérer toutes les possibilités de l’ordre SQL SELECT • Exécuter un ordre SELECT élémentaire • Faire la différence entre les ordres SQL et les commandes SQL*Plus www.TelechargerCours.com
  3. 3. 1-3 Copyright © Oracle Corporation, 1998. Tous droits réservés. Les Possibilités de l'Ordre SQL SELECT SélectionSélection ProjectionProjection Table 1Table 1 Table 2Table 2 Table 1Table 1 Table 1Table 1 JointureJointure www.TelechargerCours.com
  4. 4. 1-4 Copyright © Oracle Corporation, 1998. Tous droits réservés. Ordre SELECT Élémentaire SELECT [DISTINCT] {*, column [alias],...} FROM table; SELECT [DISTINCT] {*, column [alias],...} FROM table; • SELECT indique quelles colonnes rapporter • FROM indique dans quelle table rechercher www.TelechargerCours.com
  5. 5. 1-5 Copyright © Oracle Corporation, 1998. Tous droits réservés. Écriture des Ordres SQL • Les ordres SQL peuvent être écrits indifféremment en majuscules et/ou minuscules. • Les ordres SQL peuvent être écrits sur plusieurs lignes. • Les mots-clés ne doivent pas être abrégés ni scindés sur deux lignes différentes. • Les clauses sont généralement placées sur des lignes distinctes. • Les tabulations et indentations permettent une meilleure lisibilité. www.TelechargerCours.com
  6. 6. 1-6 Copyright © Oracle Corporation, 1998. Tous droits réservés. Sélection de Toutes les Colonnes DEPTNO DNAME LOC --------- -------------- ------------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON SQL> SELECT * 2 FROM dept; www.TelechargerCours.com
  7. 7. 1-7 Copyright © Oracle Corporation, 1998. Tous droits réservés. Sélection d’Une ou Plusieurs Colonnes Spécifiques DEPTNO LOC --------- ------------- 10 NEW YORK 20 DALLAS 30 CHICAGO 40 BOSTON SQL> SELECT deptno, loc 2 FROM dept;
  8. 8. 1-8 Copyright © Oracle Corporation, 1998. Tous droits réservés. Valeurs par Défaut des En-têtes de Colonne • Justification par défaut – A gauche : date et données alphanumériques – A droite : données numériques • Affichage par défaut : en majuscules www.TelechargerCours.com
  9. 9. 1-9 Copyright © Oracle Corporation, 1998. Tous droits réservés. Expressions Arithmétiques Possibilité de créer des expressions avecPossibilité de créer des expressions avec des données de type NUMBER et DATE audes données de type NUMBER et DATE au moyen d’opérateurs arithmétiquesmoyen d’opérateurs arithmétiques Opérateur + - * / Description Addition Soustraction Multiplication Division
  10. 10. 1-10 Copyright © Oracle Corporation, 1998. Tous droits réservés. Utilisation des Opérateurs Arithmétiques SQL> SELECT ename, sal, sal+300 2 FROM emp; ENAME SAL SAL+300 ---------- --------- --------- KING 5000 5300 BLAKE 2850 3150 CLARK 2450 2750 JONES 2975 3275 MARTIN 1250 1550 ALLEN 1600 1900 ... 14 rows selected.
  11. 11. 1-11 Copyright © Oracle Corporation, 1998. Tous droits réservés. Priorité des Opérateurs • La multiplication et la division ont priorité sur l’addition et la soustraction. • A niveau de priorité identique, les opérateurs sont évalués de gauche à droite. • Les parenthèses forcent la priorité d’évaluation et permettent de clarifier les ordres. ** // ++ __
  12. 12. 1-12 Copyright © Oracle Corporation, 1998. Tous droits réservés. Priorité des Opérateurs SQL> SELECT ename, sal, 12*sal+100 2 FROM emp; ENAME SAL 12*SAL+100 ---------- --------- ---------- KING 5000 60100 BLAKE 2850 34300 CLARK 2450 29500 JONES 2975 35800 MARTIN 1250 15100 ALLEN 1600 19300 ... 14 rows selected. www.TelechargerCours.com
  13. 13. 1-13 Copyright © Oracle Corporation, 1998. Tous droits réservés. Utilisation des Parenthèses SQL> SELECT ename, sal, 12*(sal+100) 2 FROM emp; ENAME SAL 12*(SAL+100) ---------- --------- ----------- KING 5000 61200 BLAKE 2850 35400 CLARK 2450 30600 JONES 2975 36900 MARTIN 1250 16200 ... 14 rows selected. www.TelechargerCours.com
  14. 14. 1-14 Copyright © Oracle Corporation, 1998. Tous droits réservés. La Valeur NULL • NULL représente une valeur non disponible, non affectée, inconnue ou inapplicable. • La valeur NULL est différente du zéro ou de l’espace. SQL> SELECT ename, job, comm 2 FROM emp; ENAME JOB COMM ---------- --------- --------- KING PRESIDENT BLAKE MANAGER ... TURNER SALESMAN 0 ... 14 rows selected.
  15. 15. 1-15 Copyright © Oracle Corporation, 1998. Tous droits réservés. Valeurs NULL dans les Expressions Arithmétiques Les expressions arithmétiquesLes expressions arithmétiques comportant une valeur NULL sontcomportant une valeur NULL sont évaluées à NULLévaluées à NULL SQL> select ename , 12*sal+comm 2 from emp 3 WHERE ename='KING'; ENAME 12*SAL+COMM ---------- ----------- KING
  16. 16. 1-16 Copyright © Oracle Corporation, 1998. Tous droits réservés. L’Alias de Colonne • Renomme un en-tête de colonne • Est utile dans les calculs • Suit immédiatement le nom de la colonne ; le mot-clé AS placé entre le nom et l’alias est optionnel • Doit obligatoirement être inclus entre guillemets s’il contient des espaces, des caractères spéciaux ou si les majuscules/minuscules doivent être différenciées
  17. 17. 1-17 Copyright © Oracle Corporation, 1998. Tous droits réservés. Utilisation des Alias de Colonnes SQL> SELECT ename AS name, sal salary 2 FROM emp; NAME SALARY ------------- --------- ... SQL> SELECT ename "Name", 2 sal*12 "Annual Salary" 3 FROM emp; Name Annual Salary ------------- ------------- ...
  18. 18. 1-18 Copyright © Oracle Corporation, 1998. Tous droits réservés. L’Opérateur de Concaténation • Concatène des colonnes ou chaînes de caractères avec d’autres colonnes • Est représenté par deux barres verticales (||) • La colonne résultante est une expression caractère www.TelechargerCours.com
  19. 19. 1-19 Copyright © Oracle Corporation, 1998. Tous droits réservés. Utilisation de l’Opérateur de Concaténation SQL> SELECT ename||job AS "Employees" 2 FROM emp; Employees ------------------- KINGPRESIDENT BLAKEMANAGER CLARKMANAGER JONESMANAGER MARTINSALESMAN ALLENSALESMAN ... 14 rows selected. www.TelechargerCours.com
  20. 20. 1-20 Copyright © Oracle Corporation, 1998. Tous droits réservés. Littéral • Un littéral est un caractère, une expression, ou un nombre inclus dans la liste SELECT. • Les valeurs littérales de type date et caractère doivent être placées entre simples quotes. • Chaque littéral apparaît sur chaque ligne ramenée. www.TelechargerCours.com
  21. 21. 1-21 Copyright © Oracle Corporation, 1998. Tous droits réservés. Utilisation des Chaînes de Caractères Littérales Employee Details ------------------------- KING is a PRESIDENT BLAKE is a MANAGER CLARK is a MANAGER JONES is a MANAGER MARTIN is a SALESMAN ... 14 rows selected. Employee Details ------------------------- KING is a PRESIDENT BLAKE is a MANAGER CLARK is a MANAGER JONES is a MANAGER MARTIN is a SALESMAN ... 14 rows selected. SQL> SELECT ename ||' '||'is a'||' '||job 2 AS "Employee Details" 3 FROM emp;
  22. 22. 1-22 Copyright © Oracle Corporation, 1998. Tous droits réservés. Doublons Par défaut, le résultat d’une requêtePar défaut, le résultat d’une requête affiche toutes les lignes, y compris lesaffiche toutes les lignes, y compris les doublons.doublons. SQL> SELECT deptno 2 FROM emp; SQL> SELECT deptno 2 FROM emp; DEPTNO --------- 10 30 10 20 ... 14 rows selected.
  23. 23. 1-23 Copyright © Oracle Corporation, 1998. Tous droits réservés. Élimination des Doublons Pour éliminer les doublons il faut ajouterPour éliminer les doublons il faut ajouter le mot-clé DISTINCT à la clause SELECT.le mot-clé DISTINCT à la clause SELECT. SQL> SELECT DISTINCT deptno 2 FROM emp; DEPTNO --------- 10 20 30
  24. 24. 1-24 Copyright © Oracle Corporation, 1998. Tous droits réservés. Interaction entre SQL et SQL*Plus SQL*PlusSQL*Plus BufferBuffer Scripts SQL Serveur Ordres SQLOrdres SQL Résultats de la requêteRésultats de la requête www.TelechargerCours.com
  25. 25. 1-25 Copyright © Oracle Corporation, 1998. Tous droits réservés. Comparatif entre Ordres SQL et Commandes SQL*Plus OrdresOrdres SQLSQL SQLSQL • Un langageUn langage • Standard ANSIStandard ANSI • Abréviation des mots-Abréviation des mots- clés impossibleclés impossible • Les ordres agissentLes ordres agissent sur le contenu et lasur le contenu et la définition des tablesdéfinition des tables de la base de donnéesde la base de données SQL*PlusSQL*Plus • Un environnementUn environnement • Produit propriétaire OracleProduit propriétaire Oracle • Abréviation des mots-clésAbréviation des mots-clés possiblepossible • Les commandes neLes commandes ne permettent d'agir ni sur lepermettent d'agir ni sur le contenu, ni sur lacontenu, ni sur la définition des tables.définition des tables. BufferBuffer SQLSQL CommandesCommandes SQL*PlusSQL*Plus BufferBuffer SQL*PlusSQL*Plus
  26. 26. 1-26 Copyright © Oracle Corporation, 1998. Tous droits réservés. • Extraction, modification, ajout et suppression de données au moyen d’ordre SQL. • Le formatage, le calcul, le stockage et l’impression de requête sous forme d’états. • Création de fichiers scripts. Présentation de SQL*Plus L’environnement SQL*Plus permet :L’environnement SQL*Plus permet : www.TelechargerCours.com
  27. 27. 1-27 Copyright © Oracle Corporation, 1998. Tous droits réservés. Connexion à SQL*Plus • Depuis l’environnement Windows :Depuis l’environnement Windows : • Depuis une ligne de commande :Depuis une ligne de commande : sqlplus [sqlplus [usernameusername[/[/passwordpassword [@[@databasedatabase]]]]]] www.TelechargerCours.com
  28. 28. 1-28 Copyright © Oracle Corporation, 1998. Tous droits réservés. Affichage de la Structure d’une Table Utilisez la commande SQL*PlusUtilisez la commande SQL*Plus DESCRIBE pour afficher la structure d’uneDESCRIBE pour afficher la structure d’une table.table. DESC[RIBE] tablenameDESC[RIBE] tablename www.TelechargerCours.com
  29. 29. 1-29 Copyright © Oracle Corporation, 1998. Tous droits réservés. Affichage de la Structure d’une Table SQL> DESCRIBE deptSQL> DESCRIBE dept Name Null? Type ----------------- -------- ---- DEPTNO NOT NULL NUMBER(2) DNAME VARCHAR2(14) LOC VARCHAR2(13) Name Null? Type ----------------- -------- ---- DEPTNO NOT NULL NUMBER(2) DNAME VARCHAR2(14) LOC VARCHAR2(13) www.TelechargerCours.com
  30. 30. 1-30 Copyright © Oracle Corporation, 1998. Tous droits réservés. Commandes d’Édition SQL*Plus • A[PPEND] text • C[HANGE] / old / new • C[HANGE] / text / • CL[EAR] BUFF[ER] • DEL • DEL n • DEL m n www.TelechargerCours.com
  31. 31. 1-31 Copyright © Oracle Corporation, 1998. Tous droits réservés. Commandes d’Édition SQL*Plus • I[NPUT] • I[NPUT] text • L[IST] • L[IST] n • L[IST] m n • R[UN] • n • n text • 0 text www.TelechargerCours.com
  32. 32. 1-32 Copyright © Oracle Corporation, 1998. Tous droits réservés. Commandes de Fichiers SQL*Plus • SAVE filename • GET filename • START filename • @ filename • EDIT filename : fichier afiedt.buf • SPOOL filename • EXIT www.TelechargerCours.com
  33. 33. 1-33 Copyright © Oracle Corporation, 1998. Tous droits réservés. Résumé L’environnement SQL*Plus permet :L’environnement SQL*Plus permet : • D’exécuter des ordres SQL • D’éditer des ordres SQL SELECT [DISTINCT] {*,column[alias],...} FROM table; SELECT [DISTINCT] {*,column[alias],...} FROM table; www.TelechargerCours.com

×