mysql學習記錄 MySQL學習記錄 2

2021-10-19 21:33:30 字數 939 閱讀 2611

--in 子查詢

select * from student where id in (1, 2);

--not in 不在其中

select * from student where id not in (1, 2);

--is null 是空

select * from student where age is null;

--is not null 不為空

select * from student where age is not null;

-- distinct去掉重複資料

select distinct *** from student;

1、 union和union all進行並集運算

--union 並集、不重複

select id, name from student where name like 'ja%'

union

select id, name from student where id = 4;

--並集、重複

select * from student where name like 'ja%'

union all

select * from student;

2、 intersect進行交集運算

--交集(相同部分)

select * from student where name like 'ja%'

intersect

select * from student;

3、 except進行減集運算

--減集(除相同部分)

select * from student where name like 'ja%'

except

select * from student where name like 'jas%';

學習記錄 Mysql

mysql 是官方發布的 乙個為mysql設計的c 語言的api,這個api的作用是使工作更加簡單且容易。mysql 為mysql的c api的再次封裝,它用stl standard template language 開發並編寫,並為c 開發程式設計師提供象操作stl容器一樣方便的運算元據庫的一套...

Mysql 學習記錄

本篇部落格主要記錄一些開發中使用的到一些知識點。cdata 這是乙個xml語法 是的所有在cdata中的資料都不會被解析詳細描述參見 cdata語法 concat 函式用於將多個字串連線成乙個字串注意 如有任何乙個引數為null 則返回值為 null。或許有乙個或多個引數。如果所有引數均為非二進位制...

Mysql學習記錄

一 安裝 彷彿做了場夢,mysql從5.7公升級到8了,世界變化真快。安裝時會提示輸入密碼,密碼要記住。安裝好後進到workbench看看,熟悉一下有幾個資料庫和哪些 二 連線 安裝包裡面有mysql shell,不要用這個進行連線。會毀滅你學習的慾望 使用mysql 8.0 command lin...