DB2 Building a Table instance

Source: Internet
Author: User
Tags db2

CREATE TABLE seat_[]. Tm_seat_condition
(
con_id INTEGER not NULL,
AIRLINE VARCHAR (3) Not NULL,
Flt_reg VARCHAR (5) Not NULL,
Seats VARCHAR () not NULL,
ATTRIBUTE VARCHAR (4),
Fault_type VARCHAR (2),
REASON VARCHAR (100),
Effective_date DATE not NULL,
Expiry_date DATE not NULL,
NOTE VARCHAR (1000),
Create_time TIMESTAMP not NULL,
Create_user VARCHAR () not NULL,
Update_time TIMESTAMP not NULL,
Update_user VARCHAR () not NULL,
Mark_for_delete CHAR (1) Not NULL
)
DATA CAPTURE NONE
In seat_[]_dat_32k INDEX in seat_[]_idx_4k
COMPRESS NO;

ALTER TABLE seat_[]. Tm_seat_condition ADD CONSTRAINT pk_tm_seat_condition PRIMARY KEY (con_id);
GRANT DELETE on TABLE "seat_[]". " Tm_seat_condition "to ROLE" r_updseat_[] ";
GRANT INSERT on TABLE "seat_[]". " Tm_seat_condition "to ROLE" r_updseat_[] ";
GRANT SELECT on TABLE "seat_[]". " Tm_seat_condition "to ROLE" r_selseat_[] ";
GRANT UPDATE on TABLE "seat_[]". " Tm_seat_condition "to ROLE" r_updseat_[] ";

CREATE SEQUENCE seat_[]. Tm_seat_condition_seq as BIGINT START with 1 INCREMENT by 1 MINVALUE 1 MAXVALUE 2147483647 no CYCLE CACHE no ORDER;
GRANT ALTER on SEQUENCE "seat_[]". " Tm_seat_condition_seq "to ROLE" r_updseat_[] ";
GRANT USAGE on SEQUENCE "seat_[]". " Tm_seat_condition_seq "to ROLE" r_selseat_[] ";

COMMENT on COLUMN seat_[]. Tm_seat_condition. CON_ID is ' primary key ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. AIRLINE is ' airline ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. Flt_reg is ' aircraft registration number ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. Seats is ' bad seat number, separated by commas ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. ATTRIBUTE is ' lock property ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. Fault_type is ' fault type ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. REASON is ' cause description ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. Effective_date is ' effective date ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. Expiry_date is ' expiration date ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. Note is ' remark ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. Create_time is ' creation time, accurate to seconds ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. Create_user is ' creator ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. Update_time is ' update time, accurate to seconds ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. Update_user is ' updater ';
COMMENT on COLUMN seat_[]. Tm_seat_condition. Mark_for_delete is ' logical deletion, y/n ';

DB2 Building a Table instance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.