Presentation is loading. Please wait.

Presentation is loading. Please wait.

Turn on spool and save to file a.txt

Similar presentations


Presentation on theme: "Turn on spool and save to file a.txt"— Presentation transcript:

1 Turn on spool and save to file a.txt
How to use spool Turn on spool and save to file a.txt SQL> spool a.txt SQL> describe sample.department Name Null? Type DNAME NOT NULL VARCHAR2(15) DNUMBER NOT NULL NUMBER(1) MGRSSN NUMBER(9) MGRSTARTDATE CHAR(9) SQL> spool off Turn off spool

2 How to use SQL Loader Create the database tables
Load data using SQL Loader utility sqlloader.sql create table movies ( id number(5) primary key, title varchar2(40), director varchar2(20), actor varchar2(20) ); Separate utility. Run at command prompt main201> sqlldr control=movies.ctl log=movies.log bad=movies.bad;

3 How to use SQL Loader movies.ctl movies.txt LOAD DATA
INFILE movies.txt INSERT INTO TABLE movies FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' (id, title, director, actor) movies.txt 1,'Gone with the Wind','Fleming','Gable' 2,'Gone with the Wind','Fleming','Howard' 3,'Gone with the Wind','Fleming','Leigh'


Download ppt "Turn on spool and save to file a.txt"

Similar presentations


Ads by Google