Home » SQL & PL/SQL » SQL & PL/SQL » sql script
sql script [message #1365] Wed, 24 April 2002 07:42 Go to next message
Mufaddal
Messages: 4
Registered: March 2002
Junior Member
I want to know how to write sql scripts
please give full details
Re: sql script [message #1371 is a reply to message #1365] Wed, 24 April 2002 08:00 Go to previous messageGo to next message
motiram
Messages: 21
Registered: January 2001
Junior Member
SQL script is anything that you write in a .sql file.
For example if you want to do

select * from abc_table where abc = xyz;

If you are using unix machine, you can say

vi abc.sql or emacs abc.sql

set head off
set linesize 80
select * from abc_table where abc = xyz;

If you want output of this sql into a file..you can do:

set head off
set linesize 80
spool abc.lst
select * from abc_table where abc = xyz;
spool off
Re: sql script [message #1373 is a reply to message #1365] Wed, 24 April 2002 08:02 Go to previous message
motiram
Messages: 21
Registered: January 2001
Junior Member
SQL script is anything that you write in a .sql file.
For example if you want to do

select * from abc_table where abc = xyz;

If you are using unix machine, you can say

vi abc.sql or emacs abc.sql

set head off
set linesize 80
select * from abc_table where abc = xyz;

If you want output of this sql into a file..you can do:

set head off
set linesize 80
spool abc.lst
select * from abc_table where abc = xyz;
spool off
Previous Topic: SQL question
Next Topic: date type
Goto Forum:
  


Current Time: Thu Apr 25 08:55:37 CDT 2024