mysql簡單的操作

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

mysql簡單的操作

增 insert
insert into t5(username) values('user1');
刪 delete
刪所有
delete from t5;
刪一條
delete from t5 where id=10;
刪除1<=id<=3
delete from t5 where id>=1 and id<=3;
刪除id為1,3,5
delete from t5 where id=1 or id=3 or id=5;
delete from t5 where id in(1,5,3);
改 update
修改所有
update t5 set username='9';
修改一條
update t5 set username='9' where id=9;
修改某一條中的多個字段的數(shù)據(jù)(用逗號分開)
update t5 set username='9',age=20 where id=9;
查 select
查所有
select * from t5;
查一條數(shù)據(jù)
select *from t5 where id=9;

新聞名稱:mysql簡單的操作
轉(zhuǎn)載源于:http://muchs.cn/news/142949.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供服務(wù)器托管、ChatGPT、App設(shè)計、App開發(fā)、定制網(wǎng)站、小程序開發(fā)

廣告

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

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司