Teradata语法学习

创建一个和表T2结构一样的新表T1,带数据的和不带数据的,格式如下:

create table dw.T1 as dw.T2 with data;
create table dw.T1 as dw.T2 with no data;


查看表结构定义:

show table dw.T1;

CREATE MULTISET TABLE dwmart_amp.IM_USER ,NO FALLBACK ,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT,
     DEFAULT MERGEBLOCKRATIO
     (
      USR_ID VARCHAR(10) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
     USR_PWD VARCHAR(256) CHARACTER SET LATIN NOT CASESPECIFIC TITLE '登录密码' NOT NULL,
      USR_NAME VARCHAR(64) CHARACTER SET LATIN NOT CASESPECIFIC TITLE '用户名' NOT NULL,
      USR_ATTR VARCHAR(4000) CHARACTER SET LATIN NOT CASESPECIFIC TITLE '用户属性')
UNIQUE PRIMARY INDEX PK_CS_LOG ( USR_ID );

insert into dwmart_AMP.IM_USER(USR_ID,USR_PWD,USR_NAME,USR_ATTR) VALUES('admin','111111','admin','something');


 
 

你可能感兴趣的:(Teradata)