Check if a column is accessible

Explore this snippet here.


One method to check if the current session has access to a column is to use the COL_LENGTH function, which returns the length of a column in bytes.

If the column doesn’t exist (or cannot be accessed), COL_LENGTH returns null.