statement code to find state capitals

How do I code the following statement:

What are the capitals of the following states:  Alabama, Washington, and California?
KayMJayAsked:
Who is Participating?
 
sdstuberCommented:
lots of different possible ways, but they all come down to one basic idea.

the capital must be stored somewhere with state as an identifying characteristic.

That could be XML with state nodes and capital attributes
state nodes with capital subnodes

relational tables with states and capital child tables
or a single table

the last option is probably the simplest and might look something like this...

select state, capital from state_table
where state in ('Alabama','Washington','California')
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.