表: create table SDS_CONFIRM_FOOTBALL_RESULT ( ID NUMBER not null, MID NUMBER not null, LID NUMBER not null, LEGNAME VARCHAR2(200) not null, MATCHNAME VARCHAR2(100) not null );
alter table SDS_CONFIRM_FOOTBALL_RESULT add constraint UQ_ID unique (MID, LID);
java代码xml中插入语句处理 insert into SDS_CONFIRM_FOOTBALL_RESULT (ID, MID, LID, LEGNAME, MATCHNAME) select 111112, 33, 44, '呵呵', 'aa VS bb' from dual where not exists (select 1 from SDS_CONFIRM_FOOTBALL_RESULT where MID = 33 and LID = 44 )
意思是,如果表中不存在MID = 33 并且 LID = 44的记录,就插入一条 ID = 111112, MID=33, LID=44, LEGNAME= '呵呵', MATCHNAME='aa VS bb' 这样的记录,如果存在就不插入
[code="sql"]表:create table SDS_CONFIRM_FOOTBALL_RESULT( ID NUMBER not null, MID NUMBER not null, LID NUMBER not null, LEGNAME VARCHAR2(200) n...