My db structure is (table r)
I a m looking for a query which satisfy a=1 and c=usa.If 'USA' is not avilable I need to get second row (national).How can I do this in mysql ? and If USA is avilable I need only first and third row.
Is it poosible to get in a single query,please help
I tried this but not getting exact results
select * from r where a = 1 and
WHEN (c = 'USA')
ELSE c = 'national'
rows in a database table don't have positions, so "second" is not possible
is there some other way to determine which row(s) you want if USA is not available?
solution stored procedure
This topic is now closed. New replies are no longer allowed.