# Miscellaneous > SQL Scripts >  SQL Query Error

## hype1999

I am getting an error that states single-row subquery returns more than one row:

Unique_id and org_unit are integers

update main_t set unit_descr = (select unit_desc from org_units, main_t
where unit_descr is null and unique_id = org_unit)

Please help!

Thanks...

----------


## rmiao

Ensure your subquery returns single row.

----------


## MohammedAkber

update main_t set unit_descr = (select unit_desc from org_units, main_t
where unit_descr is null and unique_id = org_unit)

In ur query above ur using = operator which takes only single value instead try using in operator. Or in subquery u can use top 1 key word according to ur requirement.

----------

