net stop/star msyl80
sql通用语法
单行注释 -- # 多行注释/ /
create database [if not exists] [default charset字符集] [collate排序规则]
drop database [if exists] 数据库名
use 数据库名 使用/切换数据库
select database() 查询当前数据库名
show tables 查询单签数据库的所有表
desc 表名 查询表结构
show create table 表明 查询指定表的建表
create table 表名(
id int(5) comment '123' not null,
字段1 字段1类型 [comment 字段1注释],
字段2 字段2类型 [comment 字段2注释],
字段3 字段3类型 [comment 字段3注释]
)[comment 表注释]
select database():查看数据库
select version():查看数据库版本
select now():查看数据库当前时间
评论 (0)