多语言展示
当前在线:832今日阅读:167今日分享:16

mysql数据库和数据表

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%';%:匹配所有 _:匹配一个
推荐信息