MySQL数据库可支持要求最苛刻的 Web、电子商务和联机事务处理 (OLTP) 应用程序。它是一个全面集成、事务安全、符合 ACID 的数据库,具备全面的提交、回滚、崩溃恢复和行级锁定功能。MySQL 凭借其易用性、扩展力和性能,成为全球最受欢迎的开源数据库。全球许多流量最大的网站都依托于MySQL来支持其业务关键的应用程序.
数据库
1、创建库
create database 库名;
2、查看库
show databases;
3、删除库
drop databases 库名;
4、进入库
use test;
数据表
1、创建表(进入库后)
create table 表名 (a int);
2、创建表
create table 库名.表名 (a int);
3、查看表
show tables;
4、删除表
drop table 表名;
5、查看表结构
desc 表名;
6、修改表
alter table a1 modify a char(10); 改表结构
alter table a1 add c int; 增加一列
alter table a1 drop c; 删除一列
alter table a1 change b bb int; 改名
alter table a1 rename a2; 改表名
7、插入数据
insert into 表名 values(数据);
8、删入数据
delete from 表名 where name=’li’;
9、查看表
select * from 表名;
select name,tel from 表名 wherename='mary';查看指定数据
select 5 between 3 and 10;
10、查看空
select * from 表名 where age isnull;
11、查看非空
select * from 表名 where age isnot null;
12、模糊查询
select * from 表名 where namelike 'a%';
%:匹配所有 _:匹配一个