查看各个编码 //查看字段编码 SHOW FULL COLUMNS from park_car_user; //查看数据库字段SHOW CREATE DATABASE db_name; //查看表的编码SHOW CREATE TABLE tbl_name; 修改数据库编码 [client] default-character-set=gbk port [server] default-character-set=gbk port [mysql] default-character-set=gbk
1.新建主键table create table demo1_zhujian ( id int primary key auto_increment, name )); 2.新建外键table create table demo2_waijian ( id int primary key auto_increment, _id , name ), index (_id), FOREIGN KEY (_id) REFERENCES demo1_zhujian(id) ON DELETE CASCA
[转自] http://blog.chinaunix.net/uid-10697776-id-2935685.html 定义 External tables access data in external sources as if it were in a table in the database. You can connect to the database and create metadata for the external table using DDL. The DDL for