Relational databases do not execute arrays; they execute scalars, rows, and tables. SQL is a declarative rather than a procedural language.
To count entries in a table, use the COUNT function:
SELECT COUNT(*) FROM tablex WHERE name IN ("hi", "hello", "good", ...)
If you need to handle a variable number of values that need to be matched in one of the statements, you can create a temporary table to store the values instead of using IN :
SELECT COUNT(*) FROM tablex JOIN names ON tablex.name=names.name
outis
source share