select count(*) 
from cols
where table_name = 'YOURTABLE'
  and column_name = 'NAME2'
------------------------------
注意,需要大写