时间:2021-07-01 10:21:17 帮助过:27人阅读
SET NAMES UTF8; DROP DATABASE IF EXISTS dangdang; CREATE DATABASE dangdang CHARSET=utf8; USE dangdang; CREATE TABLE dd_category( id INT, name VARCHAR(20), bcount INT ); INSERT INTO dd_category VALUES(100,‘计算机类‘,3); INSERT INTO dd_category VALUES(200,‘历史类‘,2); INSERT INTO dd_category VALUES(300,‘美食类‘,1); CREATE TABLE dd_book( id INT, title VARCHAR(20), price DOUBLE(10,2), pic VARCHAR(100), pubdate DATETIME, did INT ); INSERT INTO dd_book VALUES(1,‘计算机1‘,100,‘1.jpg‘,now(),100); INSERT INTO dd_book VALUES(2,‘计算机2‘,100,‘1.jpg‘,now(),100); INSERT INTO dd_book VALUES(3,‘计算机3‘,100,‘1.jpg‘,now(),100); INSERT INTO dd_book VALUES(4,‘历史1‘,101,‘1.jpg‘,now(),200); INSERT INTO dd_book VALUES(5,‘历史2‘,101,‘1.jpg‘,now(),200); INSERT INTO dd_book VALUES(6,‘美食‘,101,‘1.jpg‘,now(),300);
SOURCE d:/taobao.sql SOURCE d:/dangdang.sql
这里test.sql文件在d根目录盘下
MySql 批量创建、导入实例
标签:rod mysql reg tao arch nbsp sts price 分享