test1.sql 515 B

1234567891011
  1. -- -- drop table if exists sys_dept;
  2. -- --
  3. -- -- create table `Test1` (
  4. -- -- `Id` int(11) not null comment '默认ID',
  5. -- -- `Name` varchar(20) not null comment '默认名字',
  6. -- -- primary key (`Id`)
  7. -- -- ) engine=innoDB default charset=utf8 comment='test';
  8. -- -- insert into `Test`(`Id`, `Name`) select 1 , 'jack';
  9. --
  10. -- insert into `Test` select 1 , 'cao' where not exists(select 1 from Test where id=1);
  11. -- insert into `Test` select 1 , 'cao' from dual where not exists(select 1 from Test where id=1);