mysql -h localhost -uroot -p123456 //連接數據庫
show databases; //查看數據庫
create database if not exists db_goods; //創建數據庫
use db_goods; //使用數據庫
show tables; //查看數據庫裡表
create table goods(id int, name varchar(10)); //創建表
desc goods; //查看標結構
insert into goods(id, name) values('1', 'zhangsan'); //表中插入數據
update goods set name = 'lisi', id = '3' where id = '1'; // 更新數據
delete from goods where id = '1';//刪除數據
drop table if exists goods; //刪除表
drop database if exists db_goods; //刪除數據庫
? contents; //查看幫助
? create table;//查看創建表幫助