1 | mysql -uroot -p |
1 | show databases; |
1 | create database firstsql; |
1 | use firstsql |
1 | show tables; |
1 2 3 4 5 | create table student( ID char(7) primary key, NAME varchar(20) not null, Age varchar(20) default '10' )comment='信息'; |
1 | desc firstsql.student; |
1 | show create table student; |
1 2 3 | select * from student; select ID,NAME,Age from Student; select * from Student where ID='001'; |
1 | insert into student values ('001','二哈','计算机'); |
1 2 | delete from student; delete from student where ID='001'; |
1 | update student set NAME='物联网' where ID='001'; |
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |