You need not select a table in MySQL as you do in Oracle.
Select 2 + 2;
Is valid in MySQL and should return 4. It at least lets you know if
MySQL is functional. By mysqladmin ping will do that too.
Bellsouth Internet Services
"When all is said and done, more is said than done"
From: Srinivas B.S.S [mailto:bsssrinivas@stripped]
Sent: Tuesday, December 09, 2003 1:22 AM
To: Don Read
Subject: Re: In need of a dummy select statement ...
Thanks for the reply. It just have to be no-op and it need not
a select statement. Any one of the options given by you will work for me
they are executable from a program written using MyODBC.
Don Read wrote:
>On 08-Dec-2003 Srinivas B.S.S wrote:
>>I am a newbie to mysql db. I need a select statement which will just
>>execute and doesn't
>>return any results. Also, it should not depend on any table which is
>>specific to a database.
>>For example, Oracle has a table named 'tab' which will be present in
>>databases so my
>>dummy select statement looks like 'select tname from tab where 0=1'.
>>functionality be achieved in mysql ? Is there any table in mysql which
>>is similar to Oracle's
>Does it have to be a SELECT? Or just a NO-OP?
> - or -
>SHOW TABLES LIKE 'asdfzxcv1234';
"The information transmitted is intended only for the person or entity to which it is
addressed and may contain confidential, proprietary, and/or privileged material. Any
review, retransmission, dissemination or other use of, or taking of any action in reliance
upon, this information by persons or entities other than the intended recipient is
prohibited. If you received this in error, please contact the sender and delete the
material from all computers." 113