[M5-MAIN]_Introduction to SQL
[M5-MAIN]_Introduction to SQL
[M5-MAIN]_Introduction to SQL
INTRODUCTION TO SQL
■At the end of the chapter, the learner should be able to:
• Define terms
• Interpret history and role of SQL
• Discuss SQL:1999 and SQL:2011 standards
• Identify the different types of SQL commands
• Explore the SQL Developer and SQL *Plus environment
• Structured Query Language
High availability
Performance
Security
Information integration
There are two development environments for this course:
• Primary tool is Oracle SQL Developer
• SQL*Plus command line interface may also be used
SQL *Plus
SQL Developer
1 Connections Database
tabbed page Connection
Window
3 Click to test
Use the Connections Navigator to:
• Browse through many objects in a database schema
• Review the definitions of objects at a glance
• Use the SQL Worksheet to enter and execute SQL, PL/SQL, and SQL *Plus
statements.
• Specify any actions that can be processed by the database connection
associated with the worksheet.
1. Execute
statement
2. Run script
1 3 5 7 9
3. Commit
4. Rollback
5. Cancel
6. SQL History
7. Execute explain
plan
8. Autotrace
9. Clear
• Use the SQL Worksheet to enter and execute SQL, PL/SQL, and SQL*Plus
statements.
• Specify any actions that can be processed by the database connection
associated with the worksheet.
Enter SQL
statements.
F9 F5
F5
F9
Before
formatting
After
formatting
Snippets are code fragments that may be just syntax or examples.
When you place your cursor here, it shows the
Snippets window. From the drop-down list, you
can select the functions category that you
want.
1
sqlplus [username[/password[@database]]]
2
Use the SQL*Plus DESCRIBE command to display the structure of a table:
DESC[RIBE] tablename
DESCRIBE departments
SAVE my_query
Created file my_query
START my_query