Monday, May 23, 2011

How to insert new data from table to other table but skip already exist data

This query will skip inserting data from source table that already exist in destination table.

source table : student_ined

destination table : users


insert IGNORE into users (username,password,fullname)
Select studentID as username, student_ic as password, student_name as fullname from student_ined

No comments: