CREATE DATABASE schooldb;
SELECT DATABASE();
use schooldb;
CREATE TABLE stu_1(
id int,
name VARCHAR(10),
age int,
gender VARCHAR (10)
);
DESC stu_1;
show CREATE TABLE stu_1;
ALTER TABLE stu_1
MODIFY name VARCHAR(20);
ALTER TABLE stu_1
MODIFY age int DEFAULT 18;
ALTER TABLE stu_1
CHANGE name xingming VARCHAR(15);
DESC stu_1;
ALTER TABLE stu_1
DROP COLUMN age;
RENAME TABLE stu_1
TO stu_5201314;
ALTER TABLE stu_1
RENAME stu_886;
DROP TABLE IF EXISTS stu_5201314;
SELECT * from stu_1;
TRUNCATE TABLE stu_1;
set autocommit = FALSE;
DELETE from stu_1;
ROLLBACK;
COMMIT;