sql - Return only one row of a select that would return a set of rows -


i have table like:

create table mytab(   id integer primary key,   is_available boolean not null default true ); 

i need query returns first encountered row has is_available set false.

something like

select * mytab not is_available order id asc limit 1 

Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -