espresso_coffee
espresso_coffee

Reputation: 6110

How to create a list of column names?

I have a question about creating a list of column names from table. I have table with different activities like Football, Basketball, Volleyball,... I want to take all of these sports and put them in the list that way I can limit my query later based on the sport which user selected in drop down. Can anyone help mi with this problem?

Select *
From Activities
Where (sleceted sport) = 'Basketball';

Upvotes: 0

Views: 127

Answers (1)

BJones
BJones

Reputation: 2460

If you're looking for a SQL query to do this for you you can look here. Or here.

SELECT *
FROM ALL_TAB_COLUMNS
WHERE TABLE_NAME = 'Activities';

Upvotes: 0

Related Questions