Beginning SQL

Beginning SQL Beginning SQL

marjan.fesb.hr
from marjan.fesb.hr More from this publisher
20.07.2013 Views

Appendix B 450 Figure B-87 Another option is to select Options ➪ Environment and set the autocommit option to On. You don’t need MyTable again in this book, so delete it by executing the following statement: DROP TABLE MyTable; You add all the example tables and data to the Film Club database in Chapters 1 and 2. Note that if you download the book’s code files, you need to load them into SQL*Plus using the START command. The files contain more than one SQL statement, each separated by a semicolon. If you load the files by selecting File ➪ Open, then SQL*Plus treats all lines in the file as one big statement and you receive an illegal character error message where the first semicolon appears. Instead, to load a file, type the following statement: START file_name For example, if the file to insert film data is called FilmsTable_Data.txt and is located in your Z: drive under the BeginningSQL\Chapter2 directory, you would need to type the following command: START Z:\BeginningSQL\Chapter2\FilmsTable_Data.txt Doing so loads and executes the SQL statements in that file.

Appendix B<br />

450<br />

Figure B-87<br />

Another option is to select Options ➪ Environment and set the autocommit option to On.<br />

You don’t need MyTable again in this book, so delete it by executing the following statement:<br />

DROP TABLE MyTable;<br />

You add all the example tables and data to the Film Club database in Chapters 1 and 2. Note that if you<br />

download the book’s code files, you need to load them into <strong>SQL</strong>*Plus using the START command. The<br />

files contain more than one <strong>SQL</strong> statement, each separated by a semicolon. If you load the files by selecting<br />

File ➪ Open, then <strong>SQL</strong>*Plus treats all lines in the file as one big statement and you receive an illegal<br />

character error message where the first semicolon appears. Instead, to load a file, type the following<br />

statement:<br />

START file_name<br />

For example, if the file to insert film data is called FilmsTable_Data.txt and is located in your Z:<br />

drive under the <strong>Beginning</strong><strong>SQL</strong>\Chapter2 directory, you would need to type the following command:<br />

START Z:\<strong>Beginning</strong><strong>SQL</strong>\Chapter2\FilmsTable_Data.txt<br />

Doing so loads and executes the <strong>SQL</strong> statements in that file.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!