Hide or invisible column

Hi Team,
We have the requirement to create table with one of the columns in HIDDEN/INVISIBLE state.
I am not able to create table by specifing HIDDEN/INVISIBLE.

CREATE TABLE T1)
ID INT,
FNAME VARCHAR(55),
SSN VARCHAR(11) HIDDEN/INVISIBLE
)

appreciate if I get a solution for it.

With regards,
Prathap Reddy G

Hi Prathap,

We don’t support hidden/invisible columns. I would suggest creating a view on top of the table instead and skip the column(s) you want to hide in the view.

Hope this helps!

-Dave

Hi Deyler,
View is not the right option for us. Thank you for your response.

With regards,
Prathap Reddy G

Instead of hiding / making it invisible, could you instead mask the data?

For example, encrypt the data when inserting into the column and then have a UDF or an external function that will decrypt the data when retrieving it? Or simply encrypt it on insertion, return the encrypted value and leave decryption to the application layer?

Also, if you don’t care about the decrypted value, but only that the value remains unique, you can hash it on insert. SSN 123-45-7890 always hashing to ABC-DE-FGHI might be good enough in a test environment if it’s being used as a key and just needs to be consistent with the other supporting records associated with that key.