mysql的查詢語句

2021-09-01    分類: 網(wǎng)站建設(shè)

mysql的查詢語句

查所有
select * from t5;
查一條數(shù)據(jù)
select *from t5 where id=9;
查符合條件數(shù)據(jù)對(duì)應(yīng)列的數(shù)據(jù)
select username from user where id=4;
給字段取別名
select username user form user;
select username as user from user;
-- distinct去除重復(fù)值 ,增加多個(gè)的時(shí)候,必須兩個(gè)同時(shí)不重覆才去除顯示
select distinct username,password form user;
查詢空值 null
select * from t1 where username is null;
select * from t1 where username is not null;
like的使用方法用來做搜索
like(包含)%PHP%包含php
select * from art where content like '%PHP%';

分享題目:mysql的查詢語句
標(biāo)題鏈接:http://www.muchs.cn/news15/124765.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站收錄、網(wǎng)頁設(shè)計(jì)公司品牌網(wǎng)站制作網(wǎng)站建設(shè)企業(yè)建站、外貿(mào)建站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)