create table test
(tid number(10,0) not null primary key,
col1 varchar2(10) ,
col2 varchar2(10) ,
col3 varchar2(10) ,
col4 varchar2(10)
);insert into test values(1,'a','aa','aaa','1');
insert into test values(2,'a','aa','aaa','3');
insert into test values(3,'b','bb','bbb','4');
insert into test values(4,'b','bb','bbb','0');
insert into test values(5,'c','cc','ccc','1');
insert into test values(6,'c','cc','ccc','2');
insert into test values(7,'d','dd','ddd','0');
insert into test values(8,'a1','aa1','aaa1','3');
insert into test values(9,'a2','aa2','aaa2','2');
insert into test values(10,'a3','aa3','aaa3','1');
select * from test t
where exists(select 1 from test t2
where t.col1=t2.col1
and t.col2=t2.col2
and t.col3=t2.col3
and t.col4>t2.col4)
mybatis sql語句 和 區別聯絡
1.說白了就是,用於引用字元變數,如varchar,string.因為sql語句執行過程中要給string varchar加 來執行。2.用來引用int型等不需要新增單引號的值 3.具體,如 insert into user name values xiaoming 小明的sql語句必須加單引號,因...
mybatis sql語句 和 區別聯絡
1.說白了就是,用於引用字元變數,如varchar,string.因為sql語句執行過程中要給string varchar加 來執行。2.用來引用int型等不需要新增單引號的值 3.具體,如 insert into user name values xiaoming 小明的sql語句必須加單引號,因...
oracle 語句轉mysql語句
oracle to date 06 08 2019 16 20 50 dd mm yyyy hh24 mi ss mysql str to date 06 08 2019 16 20 50 d m y h i s mysql 類似to char to date 函式 mysql日期和字元相互轉換方法...