Содержание
- 2. Table of Contents SQL*Plus Oracle SQL*Plus Access to database SQL*Plus Commands Assignment #2 SQL Queries
- 3. SQL*Plus
- 4. Oracle SQL*Plus An Oracle command-line utility program that can run SQL commands interactively or from a
- 5. Access to DB using SQL*Plus Install Oracle Client http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html Scroll down to Oracle Database 11g Release
- 6. Access to DB using SQL*Plus (Cont’d) Install Oracle Client Download Oracle Database 11g Release 2 Client
- 7. Access to DB using SQL*Plus (cont’d) Run SQL Plus Download tnsnames.ora from course homepage and copy
- 8. Access to DB using SQL*Plus (cont’d) Access to database User-name: s[studentID]@cs360 ex) If your studentID is
- 9. SQL*Plus Commands
- 10. SQL*Plus Commands SQL*Plus buffer commands LIST List one or more lines of the SQL buffer CHANGE
- 11. SQL*Plus Commands (cont’d) SQL*Plus buffer commands Besides sending SQL statements to the server, SQL*Plus also saves
- 12. SQL*Plus Commands (cont’d) SQL*Plus buffer commands DEL Delete one or more lines of the buffer APPEND/
- 13. SQL*Plus Commands (cont’d) SQL*Plus buffer commands LIST, CHANGE SQL> select customer_numberr 2 , email 3 from
- 14. SQL*Plus Commands (cont’d) SQL*Plus buffer commands RUN(or /), DEL SQL> list; 1 select customer_number 2 ,
- 15. SQL*Plus Commands (cont’d) SQL*Plus buffer commands APPEND SQL> list; 1 select customer_numberr 2 , email 3
- 16. SQL*Plus Commands (cont’d) SQL*Plus buffer commands INPUT, CLEAR BUFFER SQL> list; 1 select customer_number 2 ,
- 17. SQL*Plus Commands (cont’d) SQL*Plus file commands SAVE, GET, START(or @) Save the contents of the SQL
- 18. SQL*Plus Commands (cont’d) SQL*Plus file commands SAVE, GET, START(or @) SQL> select customer_number, 2 email, city
- 19. SQL*Plus Commands (cont’d) SQL*Plus file commands SPOOL, HOST SQL> spool result.lst SQL> create table Spooled(name char(10));
- 20. Assignment #2
- 21. Submission Due Sep. 23, 2:00 a.m. Delay is not accepted Submission standard [student ID].lst contains the
- 22. Example Database Create tables for homework. Download HW2db.sql from the course homepage and Copy it to
- 23. Example Database (cont’d) Database Design You can see all the tables stored in your database using
- 24. Queries Q1. Find all the tuples in the Printer relation for color printers. Remember that color
- 25. Queries Q4. Find those manufactures that sell PC’s but not Laptops In oracle, the operator for
- 27. Скачать презентацию