Answers for "will an update insert if nothing is there"

0

mysql insert into if not exists

INSERT INTO table_name (firstname, lastname)
SELECT 'NEW FIRSTNAME', 'NEW LASTNAME'
FROM DUAL
WHERE NOT EXISTS(
    SELECT 1
    FROM table_name
    WHERE firstname = 'NEW FIRSTNAME' AND lastname = 'NEW LASTNAME'
)
LIMIT 1;
Posted by: Guest on May-12-2020

Code answers related to "will an update insert if nothing is there"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language