Home > Database > Mysql Tutorial > mysql数据库中相关sql语句_MySQL

mysql数据库中相关sql语句_MySQL

WBOY
Release: 2016-06-01 13:04:27
Original
1168 people have browsed it

使用sql语句创建一张表:

CREATE TABLE 表名(字段1名称 字段1类型(字段1长度),字段2名称 字段2类型(字段2长度));

使用sql给表重命名:

RENAME TABLE 旧表名 TO 新表名;

将一张表中的编号在某一区间中的数据的某个字段统一更新:

UPDATE 表名 SET 字段名=字段值 WHERE id >区间开始值 AND id

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template