Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Declaring variables

Status
Not open for further replies.

aalnaif

Technical User
Jan 12, 2007
44
CA
I know this is really simple, but I've been suck on this for 2 hrs and I can't figure it out. I'm getting a syntax error when declaring a variable within an UPDATE statement. Here's how I'm declaring it:

DECLARE cnt int
SET cnt = 1

I'm using MySQL.
 
You may get more accurate answers in the MySQL forum:
forum436

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top