時間:2024-02-13 10:22作者:下載吧人氣:35
創(chuàng)建前可先刪除
drop table tmp0
創(chuàng)建臨時表
select * into temp table tmp0 from xxx create index idx_tmp0_inner_cd on tmp0(inner_cd);
查看臨時表是否創(chuàng)建,返回0表示未創(chuàng)建,1為創(chuàng)建
select count(*) from pg_class where relname = ‘tmp0’
或者用下面,下面語句在pg和mysql中都適用
Create Table If Not Exists temp.MyTable(
xxx varchar (20) Primary key ,
thTime varchar (20) ,
name varchar (20)
)
網(wǎng)友評論