How we create a tables in db2,what is the process/syntax to
create a table with example plz?

Answers were Sorted based on User's Feedback



How we create a tables in db2,what is the process/syntax to create a table with example plz?..

Answer / dba

Its very much similar as we sue in other DB

Syntax: CREATE TABLE EMPLOYEE(EMP_ID CHAR(10), NAME VARCHAR(20))

The syntax is usful only in command center
But from GUI its more easier to create table

Is This Answer Correct ?    14 Yes 5 No

How we create a tables in db2,what is the process/syntax to create a table with example plz?..

Answer / ratheesh nellikal

Answer posted by Dba is correct.
But in real time schenario we should be more specific.
eg:
CREATE TABLE SCHEMA.TABLENAME
(column1 DATATYPE,
column2 DATATYPE,
column3 DATATYPE)
IN tablespace_name
INDEX IN index_tablespace;

so try to follow this syntax (u can have more options with
this command like u can even specify the tablespace name wr
do u want to store ur LONG object 'LONG IN
long_tablespace' )

Cheers,
Ratheesh Nellikal

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More DB2 Interview Questions

What is the purpose of coding FETCH in a SQL SELECT query? Explain with an example in Detail?

4 Answers  


I have a table name Table1 which contain columns Cust_no, car_model, country, salesamt. The records are 101, Fiat, India, 12345 2nd record is 102, Tata, USA, 98743 3rd record is 101, indica, India, 65342 4th record is 103, Toyota, UK, 64522 5th record is 103, Maruti, USA, 98632 and so on..... Now my question is write sql query which will give me detail about the sum of sales amount in perticular country

2 Answers   IBM,


What is dbrm? When it will be created?

0 Answers  


can i code union in cobol-db2 pgm ?

4 Answers   Patni,


How many Buffer pools are there in DB2 and what are they?

1 Answers   IBM,






What does db2 mean?

0 Answers  


What is a cursor and what is its function?

2 Answers  


what is diffrence b/w file-aid tool and file-aid utility???

1 Answers  


Mention the location where the output received from explain statement is stored.

0 Answers  


I have a main program (A) where we delete some rows in table in a cursor, and we commit it in sub program(B). What will happen - will we get an error or not?

2 Answers  


What does the RUNSTATS Utility do?

4 Answers  


Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?

0 Answers  


Categories