sql給變量賦值的方法 MySql數(shù)據(jù)庫的查詢、刪除、增加、修改語句?
MySql數(shù)據(jù)庫的查詢、刪除、增加、修改語句?介紹mysql數(shù)據(jù)庫的基本查詢、刪除、增加、修改語句等常用數(shù)據(jù)庫語句。第一步,查詢語句:select* from table_name或select *
MySql數(shù)據(jù)庫的查詢、刪除、增加、修改語句?
介紹mysql數(shù)據(jù)庫的基本查詢、刪除、增加、修改語句等常用數(shù)據(jù)庫語句。
第一步,查詢語句:
select* from table_name
或
select * from table_name where [條件]
第二步,增加語句或插入數(shù)據(jù)
insert into table_name (clus...) values(values...)
實例如圖:
第三步,修改數(shù)據(jù):update tablename set xx=xx,xxx=xx where xxx=xxx and xxx=xxx
第四步, 刪除語句
delete table_name where 條件
實例如圖:
注意事項注意沒行末尾的分號不能漏掉!查詢時注意*好不能亂用,否則會導(dǎo)致數(shù)據(jù)庫運行負擔。最好是需要什么字段就查詢什么字段。