We commonly encounter a scenario where we have to check if a data is already there in table before going for any insertions. So here is a quick query for this purpose
please note that i wrote this query keeping Sql Server in mind.
IF NOT EXISTS ( SELECT TOP 1 [NAME] FROM myTable WHERE [Name] = 'check_name' )
INSERT INTO myTable