Quote:
Originally posted by dbamota
In Oracle SQL you talk to SQLPLUS processor which interphases your sql to the server; you can set up an editor to edit the current command in sqlplus. In db2, each sql is an OperatingSystem command. If you want, write a bunch of sql commands, all ending in ';' in a notepad
called xyz.txt; then db2 -tf xyz.txt will read from this file(like @xyz.sql in oracle)using -o option you can spool etc. Type db2 "? options" or db2 "? help" to get more details. " is needed in some UNIX environments for certain commands. You can edit xyz.txt and rerun it.
|
there are many ways to issue commads to db2
1. using db2 CLP
from command line > db2
u will get text interface (like ORACLE sqlplus) then issue whatever u wanna
2. using system call for single command
from command line > db2 " bla bla bla "
3. using system call with files
group all commands u wanna in a file xx.xx
db2 -stf xx.xx
4. using programs
embeded sql in any prog. lang.
5. using DB2 GUI tools like command center