This is probably a stupid question, but ... I'd like to be able to take an existing query and modify it to return a single row if that's what the base query returns, and 0 rows if the base query returns multiple rows. Similarly, I'd like to also modify it to return multiple rows if that's what the base query returns, and 0 rows if the base query return a single row. What's a good way to do this? Thanks, Kevin Murphy
On Fri, Sep 10, 2004 at 17:39:31 -0400, Kevin Murphy <murphy@genome.chop.edu> wrote: > This is probably a stupid question, but ... > > I'd like to be able to take an existing query and modify it to return a > single row if that's what the base query returns, and 0 rows if the > base query returns multiple rows. Similarly, I'd like to also modify > it to return multiple rows if that's what the base query returns, and 0 > rows if the base query return a single row. > > What's a good way to do this? SELECT * FROM whatever HAVING count(*) < 1;
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера