#建庫---
create database tay
-> character set=utf8
-> collate=utf8_general_ci;
#建表---
create table student(
-> id int primary key auto_increment,
-> name varchar(20) not null,
-> age int not null,
-> address varchar(50) not null
-> );
#刪庫---drop database <數(shù)據(jù)庫名>;
#刪表---drop table <表名>;
#增---insert into student (name,age,address) values ("孫悟空",25,"花果山");
#刪---delete from student where id=1;
#改---update student set name=555,age=555,address=555 where id=53;
#查---select * from student;
#使用shell查詢數(shù)據(jù)庫
#---mysql -uroot -pTay123.. -e "use tay;select * from student;"
#使用shell自動(dòng)添加10萬條數(shù)據(jù)
#---mysql -uroot -pTay123.. -e "use tay;insert into student (name,age,address) values ('${i}',${i},'${i}');"