Skip to Content
Custom Search

Create a DB2 Table

 

 
 
 
 
 
 
 
 
 
Create a DB2 Table
 
 
How to create a DB2 Table?
 
The following query can be used to create a DB2 table
 
 
CREATE TABLE Table_Name
(
Column_one datatype,
column_two datatype
:
:
)
 
 
An example is shown below
 
CREATE TABLE Emp_Table
(
 
Emp_Number CHAR(10) NOT NULL WITH DEFAULT,
Emp_Salary DECIMAL(10,0) NOT NULL WITH DEFAULT,
Emp_Sec_code SMALLINT NOT NULL WITH DEFAULT
)
; ; ; ;

Comments

Post new comment

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 1 user and 37 guests online.

Online users

  • amarici91
Dr. Radut | page