創建數據庫db_ck,再創建表t_hero,將四大名著中的主要人物都插入這個表中,將實現過程中sql提交上上來
1、創建數據庫db_ck
mysql> create database db_ck;
2、創建表t_hero
mysql> use db_ck
Database changed
mysql> create table t_hero (
-> id int primary key auto_increment,
-> name varchar(255) not null);
Query OK, 0 rows affected (0.01 sec)
3、插入數據
mysql> insert into t_hero (name )values
-> (“悟空”),
-> (“賈寶玉”),
-> (“趙云”),
-> (“松江”);
Query OK, 4 rows affected (0.00 sec)
4、查看