Insert into ProjectCode(ProjectCode_Item_Code)
SELECT ProjectCode_Item_Code
FROM ProjectCode
WHERE NOT EXISTS(SELECT ProjectCode_Item_Code
FROM ProjectCode where ProjectCode_Item_Code = xx) ;

I want to check if the row already exists in the table, if so then don't do anything but if it does not exists then insert the row. Above is just an example of what I am trying to do.

The problem is when this table does not have any records, its empty then
NOT EXISTS(SELECT ProjectCode_Item_Code
FROM ProjectCode where ProjectCode_Item_Code = xx)
will not return anything , then will my query work ?


Thanks
Sonali