The Pl/SQL Syntax create table.

-- Create table
create table autocodes.
(
  codeid char(50) not null,
  bqty   number default 0 not null,
  descs  nvarchar2(30)
)
;
-- Add comments to the columns
comment on column autocodes..codeid
  is 'The identity of the code';
comment on column autocodes..bqty
  is 'The base qty of the code';
comment on column autocodes..descs
  is 'The identity''s comments';
-- Create/Recreate primary, unique and foreign key constraints
alter table autocodes.
  add constraint pk_autocodes primary key (CODEID);
posted @ 2005-11-12 15:59  23热爱,自学业余码农。  阅读(248)  评论(0)    收藏  举报