Hi,
I hope I don't embarres myself because of the simplicity of this questrion,
but what would be the fastest way to determine, if a query would return any
rows (without actually returning them, and I don't need to know how many
there are, either)?
Thanks,
KlausYou can use the EXISTS() clause like:
IF EXISTS( SELECT * FROM ... )
Anith|||Thanks!
"Anith Sen" <anith@.bizdatasolutions.com> schrieb im Newsbeitrag
news:OOgsG%23LMFHA.3296@.TK2MSFTNGP15.phx.gbl...
> You can use the EXISTS() clause like:
> IF EXISTS( SELECT * FROM ... )
> --
> Anith
>
Showing posts with label embarres. Show all posts
Showing posts with label embarres. Show all posts
Monday, March 12, 2012
Fastest way to determine if a query returns any rows
Hi,
I hope I don't embarres myself because of the simplicity of this questrion,
but what would be the fastest way to determine, if a query would return any
rows (without actually returning them, and I don't need to know how many
there are, either)?
Thanks,
Klaus
You can use the EXISTS() clause like:
IF EXISTS( SELECT * FROM ... )
Anith
|||Thanks!
"Anith Sen" <anith@.bizdatasolutions.com> schrieb im Newsbeitrag
news:OOgsG%23LMFHA.3296@.TK2MSFTNGP15.phx.gbl...
> You can use the EXISTS() clause like:
> IF EXISTS( SELECT * FROM ... )
> --
> Anith
>
I hope I don't embarres myself because of the simplicity of this questrion,
but what would be the fastest way to determine, if a query would return any
rows (without actually returning them, and I don't need to know how many
there are, either)?
Thanks,
Klaus
You can use the EXISTS() clause like:
IF EXISTS( SELECT * FROM ... )
Anith
|||Thanks!
"Anith Sen" <anith@.bizdatasolutions.com> schrieb im Newsbeitrag
news:OOgsG%23LMFHA.3296@.TK2MSFTNGP15.phx.gbl...
> You can use the EXISTS() clause like:
> IF EXISTS( SELECT * FROM ... )
> --
> Anith
>
Fastest way to determine if a query returns any rows
Hi,
I hope I don't embarres myself because of the simplicity of this questrion,
but what would be the fastest way to determine, if a query would return any
rows (without actually returning them, and I don't need to know how many
there are, either)?
Thanks,
KlausYou can use the EXISTS() clause like:
IF EXISTS( SELECT * FROM ... )
--
Anith|||Thanks!
"Anith Sen" <anith@.bizdatasolutions.com> schrieb im Newsbeitrag
news:OOgsG%23LMFHA.3296@.TK2MSFTNGP15.phx.gbl...
> You can use the EXISTS() clause like:
> IF EXISTS( SELECT * FROM ... )
> --
> Anith
>
I hope I don't embarres myself because of the simplicity of this questrion,
but what would be the fastest way to determine, if a query would return any
rows (without actually returning them, and I don't need to know how many
there are, either)?
Thanks,
KlausYou can use the EXISTS() clause like:
IF EXISTS( SELECT * FROM ... )
--
Anith|||Thanks!
"Anith Sen" <anith@.bizdatasolutions.com> schrieb im Newsbeitrag
news:OOgsG%23LMFHA.3296@.TK2MSFTNGP15.phx.gbl...
> You can use the EXISTS() clause like:
> IF EXISTS( SELECT * FROM ... )
> --
> Anith
>
Subscribe to:
Posts (Atom)