1. 程式人生 > >mysql source命令超大檔案匯入方法總結

mysql source命令超大檔案匯入方法總結

CREATE TABLE emp(eid INT PRIMARY KEY AUTO_INCREMENT, ename VARCHAR(20) NOT NULL, esex VARCHAR(10), deptid INT NOT NULL);
CREATE TABLE dept(deptid INT PRIMARY KEY AUTO_INCREMENT, dname VARCHAR(20) NOT NULL,daddress VARCHAR(200));
INSERT INTO emp(ename,esex,deptid) VALUES('chris','M',1),('edge','M',1),('kelly','W',2),('maryse','W',2);
INSERT INTO dept(dname,daddress) VALUES('development','beijing'),('accounting','shanghai');
SELECT ename,esex,dname,daddress FROM emp,dept WHERE emp.deptid=dept.deptid ORDER BY ename;