I have a table with specific columns and rows. I would like to select columns which has data more than length 7.
For ex: Table has columns
Name Address PhoneNumber
AAA AAAAAAAA 12345678
BBBBB BBBBBBB 47854
CCC FFFF 76643
Here columns 'Address ' and 'Phone Number' has data length more than 7. So it should display,
Address
PhoneNumber
as results. This is for a particular table. Here I do not know already that Address and PhoneNumber are the columns which have data greater than length 7. Only from the query result I will be able to find it.
SELECT <<all_columns>> from table where length(columns)>7
is my input requirement.
The LENGTH or LEN functions in 'Where' clause gives option to give only one specific column name
instead of LENGTH(COL_NAME)
, I need option as where LENGTH(<> or something like LENGTH(*)) > 7
should be given as input.
How that can be achieved?