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

File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?

0 Answers   Infosys,


How can the duplicate values be eliminated from db2 select?

0 Answers  


What are the Isolation levels possible ?

5 Answers  


Define declaration generator (dclgen).

0 Answers  


What is collection in db2 bind?

0 Answers  






What are the functions of Bind?

2 Answers   Amdocs, IBM,


What is the difference between db2 and oracle?

0 Answers  


I have 3 cursors declared. Cursor1 retieves some data. Based on this curso2 will also fetches some data. In cursor3 (using for some updation) I'm using the data retrieved by the above 2 cursor. My question is, while working with cursor3, periodically if I give commit, will all the three crsors will be closed or only cursor3 will be closed?

4 Answers  


What is the use of COMMAREA ?Minimum how much data we can pass from it?

7 Answers   Cap Gemini,


What is multi row fetch in db2?

0 Answers  


What is dclgen in db2?

0 Answers  


Q4. How will you get the count of record without using COUNT verb in query?

2 Answers   IBM,


Categories