According to mySQL documentation, it does have DECLARE:

http://dev.mysql.com/doc/refman/5.0/en/declare.html

On 10/23/06, Doug Brown <[EMAIL PROTECTED]> wrote:
>
> Hi, I have the following in one of my queries to avoid using auto
> increment. I was using MSSQL and am now using mySql. I am assuming that
> mySql does not have the DECLARE function...What would the mySql syntax be?
>
> DECLARE @maxid int
>    BEGIN
>    SELECT  @maxid = MAX(cat_ID)
>    FROM   categories
>    IF    @maxid IS NULL
>    SELECT   @maxid = 1
>    ELSE
>    SELECT   @maxid = @maxid + 1
>    END
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257747
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to