How can i insert the multiple data in table using the existance condition? I am able to insert the multiple data in table mytest using the below query. But how can i modify the below query so that everytime it checks the first_name and @id_for_test and if its unique, it does allow to insert into mytesttable. 

 BEGIN
    DECLARE @id_for_test INT

    SELECT @id_for_test = ixp_tables_id
    FROM   mytables
    WHERE  table_name = 'test123'

    INSERT INTO mytest
    (
        first_name,
        table_id

    )

    VALUES('f1', @id_for_test),
          ('f2', @id_for_test),
          ('f3', @id_for_test),
          ('f4', @id_for_test),
          ('f5', @id_for_test),
          ('f6', @id_for_test)
END


Currently when i run this multiple time, it will insert the data multiple times. Instead i want,  it doesnot allow to insert the duplicate data matching the first_name and table_id.
INSERT dbo.mytest(first_name, table_id)
SELECT fn, ti FROM 
(
  VALUES('f1', @id_for_test),
        ('f2', @id_for_test),
        ('f3', @id_for_test),
        ('f4', @id_for_test),
        ('f5', @id_for_test),
        ('f6', @id_for_test)
) AS x(fn, ti)
WHERE NOT EXISTS 
(
  SELECT 1 FROM dbo.mytest
    WHERE first_name = x.fn
      AND table_id   = @id_for_test -- or = x.ti
);