Hi Walker,
Here is the query you can try
IF EXISTS
(SELECT username,password
FROM tb_1)
BEGIN
UPDATE tbl_1
SET tbl_1.username = tbl_2.username,
tbl_1.password = tbl_2.password
WHERE tbl_1.user_id = tbl_2.user_id
END
ELSE
BEGIN
INSERT INTO tbl_1 (username,password)
SELECT username,
password
FROM tbl_2 WHERE user_id=user_id
END
Hope this helps you a bit.
Regards,
RK