MS-SQL: Insert value only if value not present
Posted on 2004-09-25
I'm trying to be more selective on my row inserts. Probably better than deleting duplicate rows later. So, I have the following syntax which is incorrect, but you'll get the idea I'm attempting.........
INSERT INTO table1 (col_1) VALUES ( '22.214.171.124' )
(select col_1, count(*) as counted
where col_1 value not exist)