I have a requirement to grant permissions on database objects to roles and users.
As per my understanding we have to "grant execute" permission to table value functions and "grant select" on scalar functions and procedures.
How can these two types of functions be differentiated through program or by query?