I would not do that because that would return as many 1s as there are rows in the 
table. Something like count(*) may not be the most efficient but it returns just 1 row 
always. Also with using 1, you cannot guarantee a row will come back.



Allistair Crossley
__________________________ 

Intranet Senior Developer
New Media Group, QAS Ltd
Telephone: 020 7819 5343
__________________________


-----Original Message-----
From: Michael Duffy [mailto:[EMAIL PROTECTED]
Sent: 08 January 2004 15:25
To: Tomcat Users List
Subject: RE: Microsoft SQL Server validation query



Or even "SELECT 1 FROM TABLE".  No COUNT overhead, if
any. - MOD


--- Allistair Crossley <[EMAIL PROTECTED]>
wrote:
> i think you could use anything .. maybe
> 
> SELECT COUNT(*) FROM table
> 
> The dual table is an oracle dummy table and is quite
> handy, but I think the validation query can just be
> any old select statement that should return true a
> result always.
> 
> ADC
> 
> -----Original Message-----
> From: Derek Mahar [mailto:[EMAIL PROTECTED]
> Sent: 08 January 2004 15:15
> To: Tomcat Users List
> Subject: Microsoft SQL Server validation query
> 
> 
> Does anyone happen to know which validation query I
> should use for
> Microsoft SQL Server?
> 
> Derek
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
>
-------------------------------------------------------
> QAS Ltd.
> Developers of QuickAddress Software
> <a href="http://www.qas.com";>www.qas.com</a>
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
>
-------------------------------------------------------
> </FONT>
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to