INSERT INTO Table2 (UserName,Password) SELECT UserName,Password FROM Table1 WHERE UserName='X' AND Password='X'