I am trying to create a simple function (or possible a stored procedure) that returns a list of values.
For example:
select title
from title
where tittle not in ('sample1','sample2',etc...)
so the results of this query will be:
title1
title2
title3
etc
I want to use this function over and over again in several other queries I have written, am just trying to avoid writing the long query which takes time and is tedious.
Not sure whether a stored procedure is best or function. and not sure which type of function is best (table?)