INSERT INTO blacklist( ID,
PHONENO,
BLACKCUST,
VALIDCUST,
VEHICLENO,
DATASOURCE,
TYPE,
TYPEDETAIL,
CREATEDDATE,
CREATEDBY,
UPDATEDDATE,
UPDATEDBY,
VALIDFLAG,
ISEXCLUDED)
SELECT
SEQ_BLACKLIST_ID.nextval,
PHONENO,
BLACKCUST,
VALIDCUST,
VEHICLENO,
DATASOURCE,
TYPE,
TYPEDETAIL,
CREATEDDATE,
CREATEDBY,
UPDATEDDATE,
UPDATEDBY,
VALIDFLAG,
PHONENO,
BLACKCUST,
VALIDCUST,
VEHICLENO,
DATASOURCE,
TYPE,
TYPEDETAIL,
CREATEDDATE,
CREATEDBY,
UPDATEDDATE,
UPDATEDBY,
VALIDFLAG,
ISEXCLUDED)
SELECT
SEQ_BLACKLIST_ID.nextval,
PHONENO,
BLACKCUST,
VALIDCUST,
VEHICLENO,
DATASOURCE,
TYPE,
TYPEDETAIL,
CREATEDDATE,
CREATEDBY,
UPDATEDDATE,
UPDATEDBY,
VALIDFLAG,
ISEXCLUDED FROM blacklist
注释:blacklist为表名,id为主键,注意,id不可以直接用原表中的数据插入,因为会”违反唯一约束条件“!!!
可以用sequence产生id!