Blogger Information
Blog 55
fans 0
comment 0
visits 50682
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
数据库的增删改查
Bean_sproul
Original
630 people have browsed it

数据库的SQL命令

语法:INSERT `表名`(‘字段’,‘字段’)VALUES ('字段','字段');

实例

INSERT INTO `staff` (`name`,`salary`) VALUES ('张三',5000);

运行实例 »

点击 "运行实例" 按钮查看在线实例


语法:DELETE FROM `表名` WHERE 条件;

实例

DELETE FROM `staff` WHERE `id`= 2;

运行实例 »

点击 "运行实例" 按钮查看在线实例


语法:UPDATE  `表名` SET  ‘字段’,‘字段’WHERE 条件

实例

UPDATE `staff` SET `name`='hong',`age`=60,`salary`=8888 WHERE `id`=4;

运行实例 »

点击 "运行实例" 按钮查看在线实例


SELECT * FROM 表名   查出所有记录

SELECT `字段`,`字段` FROM 表名   查出该字段的所有记录

SELECT `字段`,`字段` FROM 表名 WHERE 条件   查出该字段的符合条件记录

实例

SELECT `name`,`age` FROM `staff` WHERE `age`>30;
SELECT `name` FROM `staff`;
SELECT * FROM `staff`;

运行实例 »

点击 "运行实例" 按钮查看在线实例

Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post