這些技巧是適用于有一定的開發經驗的程序員,新手確實看不懂,我有時候也是看的一知半解,不過確實講的很好,都是一些經典用法
2016-09-07
最新回答 / Kile3629846
limit限制數量,限制只插入user1_test中(user_name,over,mobile)?前兩條記錄的值,所以后來只有前兩條記錄重復了
2016-08-31
單純看老師的視頻,太難懂,不如先看了《MySQL技術內幕:SQL編程》(姜承堯),然后看這個視頻,很容易看懂。
2016-08-29
最贊回答 / Lindsay_Hu
<...code...>##準備好要用的表create table user1_practice(id int not null auto_increment primary key,user_name varchar(3),over varchar(5),mobile varchar(100));insert into user1_practice(user_name,over,mobile) values ('唐僧','旃檀功德佛',...
2016-08-19
select name,SUBSTRING_INDEX(SUBSTRING_INDEX(mobile,',',id),',',-1) from tb_sequence a CROSS join
(select name,CONCAT(mobile,',')mobile,(LENGTH(mobile)-length(replace(mobile,',',''))+1) size from tb_user1 )b
on a.id<=b.size;
(select name,CONCAT(mobile,',')mobile,(LENGTH(mobile)-length(replace(mobile,',',''))+1) size from tb_user1 )b
on a.id<=b.size;
2016-08-19
coalesce(item1,item2,item3)
依次判斷item值,返回第一個不為null的值,若全為null,則返回null;
依次判斷item值,返回第一個不為null的值,若全為null,則返回null;
2016-08-09
create table tb_sequence(id int auto_increment not null ,primary key(id) );
insert into tb_sequence values(),(),(),(),(),(),(),(),(),(),(),(),();
insert into tb_sequence values(),(),(),(),(),(),(),(),(),(),(),(),();
2016-08-05