| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| What is the equalant statement in DB2 for the Oracle sql's below. Thanks PROMPT "Please enter the tablespace name for small tables [DATA1]: " DEF small_data_ts=&1 CREATE TABLE BONUS ( ENAME VARCHAR2(10 CHAR ), JOB VARCHAR2(9 CHAR), SAL NUMBER, COMM NUMBER )TABLESPACE &&small_data_ts; CREATE TABLE SALGRADE ( GRADE NUMBER, LOSAL NUMBER, HISAL NUMBER )TABLESPACE &&small_data_ts; |
|
#2
|
| create table space small_data_ts managed by system using ('d:\small_data_ts') create table bonus (ename varchar (10), job varchar (10), sal int, comm int) in small_data_ts CREATE TABLE SALGRADE (GRADE integer, LOSAL integer, HISAL integer ) in small_data_ts schaturvedula-at-thegoldensource.com wrote: > What is the equalant statement in DB2 for the Oracle sql's below. > > Thanks > > PROMPT "Please enter the tablespace name for small tables [DATA1]: " > DEF small_data_ts=&1 > > CREATE TABLE BONUS > ( > ENAME VARCHAR2(10 CHAR ), > JOB VARCHAR2(9 CHAR), > SAL NUMBER, > COMM NUMBER > )TABLESPACE &&small_data_ts; > > CREATE TABLE SALGRADE > ( > GRADE NUMBER, > LOSAL NUMBER, > HISAL NUMBER > )TABLESPACE &&small_data_ts; > |
|
#3
|
| Thanks for the reply. what if i want to provide the tablespace name at execution time instead of having it in the script. something like CREATE TABLE BONUS ( ENAME VARCHAR2(10), JOB VARCHAR2(9), SAL NUMBER, COMM NUMBER )TABLESPACE &&small_data_ts; where i can enter the tablespace name at runtime. thanks |
|
#4
|
| You'd have to use whatever scripting language is available from your operating system (i.e. ksh on UNIX). schaturvedula-at-thegoldensource.com wrote: > Thanks for the reply. what if i want to provide the tablespace name at execution time instead of having it in the script. > > something like > > CREATE TABLE BONUS > ( > ENAME VARCHAR2(10), JOB VARCHAR2(9), SAL NUMBER, COMM NUMBER )TABLESPACE &&small_data_ts; > > where i can enter the tablespace name at runtime. > > thanks |
|
#5
|
| Thanks for the reply |
|
#6
|
| This article may also help: http://www-128.ibm.com/developerwork...07fierros.html schaturvedula-at-thegoldensource.com wrote: > Thanks for the reply |
|
#7
|
| One more thing - it you've used TOAD with Oracle, you may want to read this: http://www.devx.com/IBMDB2/Article/29615 blair kenneth adamache wrote: > This article may also help: > > http://www-128.ibm.com/developerwork...07fierros.html > > > schaturvedula-at-thegoldensource.com wrote: > >> Thanks for the reply |
![]() |
| Thread Tools | |
| Display Modes | |