update customer. tkhxx_ex b
set xm = ( select khxm from customer. tkhxx a where khh = b. khh)
where exists ( select 1 from customer. tkhxx a where khh = b. khh)
with t1 as ( select 1 from dual) ,
t2 as ( select 2 from dual)
select * from t1, t2
select a1 c1, a2 c2 from a union select b1 c1, b2 c2 from b
select a1 c1, a2 c2 from a union all select b1 c1, b2 c2 from b
create table ipx. tIP_HZZQGL_bak as select * from ipx. tIP_HZZQGL
insert into ipx. tIP_HZZQGL( ID, BH, HZFL, DWMC, LOGO, DWJJ, XXJS, PX, ZT, CJRQ, BDRQ, XMTP, DWQC, DWMC_EN, DWJJ_EN, XXJS_EN, YYXZ, SFSYZS, GLYH)
select ID, BH, HZFL, DWMC, LOGO, DWJJ, XXJS, PX, ZT, CJRQ, BDRQ, XMTP, DWQC, DWMC_EN, DWJJ_EN, XXJS_EN, YYXZ, SFSYZS, GLYH from ipx. tIP_HZZQGL_bak
drop table ipx. tIP_HZZQGL_bak
use 数据库(在哪个数据库中建表)
create table 表名
(
字段名1 (列名) 数据类型 列的特征,
字段名2 (列名) 数据类型 列的特征( NOT NULL ) ,
. . . . . .
)
create table 表名
(
字段名1 (列名) 数据类型 列的特征,
字段名2 数据类型 列的特征( NOT NULL ) ,
. . . . . .
primary key ( 主键列字段)
)
create table 新表
as
select * from 旧的表 where 1 = 2
create table 新表
as
select * from 旧的表 where 1 = 1