You can do this using the INSERT ... SELECT Syntax :
INSERT INTO MyTable (user_name, password) SELECT 'john', '366543' UNION ALL SELECT 'sam', '654654' LIMIT 2;
Not sure why you would like ... perhaps if you had a very long list of static values ββthat you would like to easily control by setting a limit?
EDIT: As pst notes, LIMIT is actually part of SELECT and has nothing to do with INSERT itself ...
source share