1 数据库相关操作
CREATE DATABASE IF NOT EXISTS daily-test DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
drop database daily_test;
use daily_test
具体操作如下图上所示:
2 mysql常用数据类型
MySQL 数据类型 | 菜鸟教程
3 数据库表相关操作
CREATE TABLE IF NOT EXISTS `runoob_tbl`( `runoob_id` INT UNSIGNED AUTO_INCREMENT, `runoob_title` VARCHAR(100) NOT NULL, `runoob_author` VARCHAR(40) NOT NULL, `submission_date` DATE, PRIMARY KEY ( `runoob_id` ) )ENGINE=InnoDB DEFAULT CHARSET=utf8;
drop table runoob_tbl;
4 数据库表的插入与查询
INSERT INTO runoob_tbl (runoob_title, runoob_author, submission_date) VALUES (" PHP", "", NOW());
select * from runoob_tbl \G
select * from runoob_tbl;
5 where子语句