Database Reference
In-Depth Information
The Save button
The Save dialog box
The DBP-e13-Cape-
Codd-Database folder
Existing SQL scripts—
these were used to
create and populate
the Cape-Codd
database
The Documents
Folder button
The DBP-e13-Cape-
Codd-Database folder
button
Type the SQL script
file name here
The dialog box Save
button
Figure 2-19
Saving an Oracle SQL
Query as an SQL Script in
Oracle SQL Developer
subfolder for each database in the SQL Developer folder. We have created a folder named DBP-
e13-Cape-Codd-Database. to store the script files associated with the Cape Codd database.
Saving an SQL Script in Oracle SQL Developer
1.
Click the Save button shown in Figure 2-19. The Save dialog appears, as shown in
Figure 2-19.
2.
Click the Documents button on the Save dialog box to move to the Documents folder
and then browse to the DBP-e13-Cape-Codd-Database folder.
3.
Note that there are already two SQL script names displayed in the dialog box. These
are the SQL scripts that were used to create and populate the Cape Codd data-
base tables, and they are available on our Web site at www.pearsonhighered.com/
kroenke .
4.
In the File Name text box, type the SQL script file name SQL-Query-CH02-01.sql.
5.
Click the Save button.
To rerun the saved query, you would click the SQL Developer Open File button to open
the Open File dialog box, browse to the query file, open the query file, and then click the
Execute button.
At this point, you should work through each of the other nine queries in the pre-
ceding discussion of the SQL SELECT/FROM/WHERE framework. Save each query as
SQLQuery-CH02-##, where ## is a sequential number from 02 to 09 that corresponds to the
SQL query label shown in the SQL comment line of each query.
Using SQL in Oracle MySQL 5.6
Before you can use SQL statements with Oracle MySQL 5.6, you need access to a computer
that has MySQL 5.6 installed and that has a database with the tables and data shown in
Figure 2-4, 2-5, and 2-6. Your instructor may have installed MySQL 5.6 in your computer lab
and entered the data for you. If so, follow his or her instructions for accessing that data-
base. Otherwise, you will need to obtain a copy of MySQL Community Server 5.6 and install
 
Search WWH ::




Custom Search