So I have the following example query
INSERT INTO company (name)
SELECT 'test'
FROM company
WHERE
NOT EXISTS (SELECT 'test' FROM company WHERE name = 'test');
However this does not work when the table is empty.
I thought something like this would work
INSERT INTO company (name)
SELECT 'test'
FROM company
WHERE
(SELECT COUNT(*) FROM company) = 0
OR
NOT EXISTS (SELECT 'test' FROM company WHERE name = 'test');
But it didn't work either. Any ideas?