Posted by Steve215 on 10/17/07 15:52
On Oct 17, 9:44 am, Mukesh_Singh_N...@yahoo.com wrote:
> I've come accross queries like this one previously but never got the
> time to carefully study them form some book.
>
> SELECT 1 WHERE 1 = 1
>
> 1) What do queries like these mean? From common sense, I can deduce
> that it is some kind of a test for a boolean value, but the result is
> already deterministic in the above case (true).
>
> What use is such a query for?
>
> 2) What dialect of SQL (ANSI/T-SQL) does MS-SQL Server use?
The where clause 'WHERE 1=1' simply returns all rows since 1=1 is
always true.
[Back to original message]
|