mysql簡(jiǎn)單的操作

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

mysql簡(jiǎn)單的操作

增 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;
修改某一條中的多個(gè)字段的數(shù)據(jù)(用逗號(hào)分開(kāi))
update t5 set username='9',age=20 where id=9;
查 select
查所有
select * from t5;
查一條數(shù)據(jù)
select *from t5 where id=9;

新聞名稱(chēng):mysql簡(jiǎn)單的操作
轉(zhuǎn)載源于:http://bm7419.com/news/142949.html

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

廣告

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

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