Thanks for replt but I'm using LOAD DATA LOCAL INFILE to load data into a table from a .csv file.
Not sure if you can alter the data as it goes in with this.
The csv file has 1,000,000 rows.
Auctually that was round the wrong way. Correct SQL query is:
SELECT t2.site, t2.rank
FROM t2
LEFT OUTER
JOIN t1
ON t1.site = t2.site
WHERE t1.site IS NULL
I have this sql query that compares two tables (t1 to t2) and creates a new table with anything that doesn't exist in the 'site' colum of t1:
CREATE TABLE newtable
SELECT t1.site, t1.rank
FROM t1
LEFT OUTER
JOIN t2
ON t2.site = t1.site
WHERE t2.site IS NULL
This works fine but I need...
I have two tables (table1 & table2) that contain fields ID and SITE. Both tables contain one million (1000000) rows each.
I need to compare the SITE field in the tables to find out what data exisits in the second table that does not exist in the first.
I have tried the following but because of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.