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 will the COMMIT accomplish?

5 Answers  


List out the buffer pools in db2

0 Answers  


What is an asychronous write?

1 Answers  


how do you resolve -818 error in db2. where we have to see time stamp token. i said by seeing in load module and plan .is it correct or not. give clear explination for how to see time stamp token

2 Answers   IBM, TRD,


how 2 resolve the -311 sqlcode

1 Answers  


Comment whether dclgen is mandatorily used. If not, then what is the point of using it?

0 Answers  


Mention the various locks that are available in db2.

0 Answers  


When do you specify the isolation level?

0 Answers  


what's the equivalent Cobol Data type for Decimal(x,y) in DB2? what does the current SQLID register contain?

3 Answers   Cap Gemini, Tech Mahindra,


How do I optimize a query in db2?

0 Answers  


What is db2 connect?

0 Answers  


What is subquery ?

6 Answers  


Categories