The system administrator keeps the most up-to-date information on this subject in this place. Here is a summary.
$> source ~db2inst1/db2cshrc
to make sure type:
$> which db2
the correct output is
$> /home/users/db2inst1/sqllib/bin/db2
Tip: To avoid executing this step each time you login, put command source ~db2inst1/db2cshrc in your file .cshrc under your home directory. This will get it executed automatically.
db2=>connect to <your_database> user <your_DB2_username>
using <your_DB2_password>
your database and your db2 username
are the same and they are your DB2 account, e.g., cse53240.
db2=>create table test (num int)
db2=>insert into test values(10)
db2=> select * from test
db2 => create distinct type mp3 as blob(100M)
db2 => create
function mplay(mp3) returns integer external name 'MP3!play' language java
parameter style db2general no sql deterministic no external action not fenced
For more infomation regarding how to write IBM DB2's UDT and UDF in Java, check out Manuals for DB2 UDB 8.
db2=> quit
create type Address_t AS (street VARCHAR(30), number CHAR(15))
MODE
DB2SQL
create table student (name VARCHAR(20), add Address_t)
create type USAddress_t UNDER Address_t AS(zip CHAR(10), state
VARCHAR(20
)) MODE DB2SQL
LISTOF and SETOF are not supported.
Quip is installed in the Graduate NT Lab. You can start Quip by using the shortcut in the Programs item of the Start menu. All Quip logfiles are written to "C:\Temp\%USERNAME%".
You can also download a copy of Quip from the Software AG site: http://www.softwareag.com/developer/quip/ After the installation, double click 'QuipGui' and run the application. Data to be used by the queries will be stored in your files. You must set Quip to use the file system: Make sure that the radio button 'Filesystem' is selected (default). To run the examples that come with the system, enter 'examples' in the field 'Directory:' (this value is preselected).
Then select the 'open' item of the file menu (or click on the 'open folder' icon) and open any of the *.xquery files in one of the subdirectories, for example: 'usecases\Tree\TREEQ6.xquery'. An XQuery query should appear.
Press the execute button to run the query.