Click here to Skip to main content
15,867,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
an example i have 10 columns in my table

5.,6.,7.,9. columns is null ,no any data (null columns variable)

so
i want get only

1,2,3,4,8,10 columns with my query

i hope i could explain

What I have tried:

i didnt find any answer

oracle get only not null columns - Google Search[^]
Posted
Updated 25-Aug-21 23:12pm

1 solution

Sorry, but it sounds like bad database design.

If you want to get only those columns where any of record is NOT NULL, then you're in trouble. There's no simple way to achieve that, due to the fact that you'll need to create dynamic SQL statement based on content of table.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900