vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all, I am using mysql 5.0.54, i want to create procedure, i tried an example in mysql link "CREATE PROCEDURE sp1 (x VARCHAR(5)) BEGIN DECLARE xname VARCHAR(5) DEFAULT 'bob'; DECLARE newname VARCHAR(5); DECLARE xid INT; SELECT xname,id INTO newname,xid FROM table1 WHERE xname = xname; SELECT newname; END;" but i see an error "ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3", In all links & documentation i find the same syntax for declare statements, i have also created a table which the stored procedure points to. There is no exact documentation or links for this in MySQL. I wont get any replies for posts in mysql, so im posting here.. please please guide me ASAP ... waiting for ur reply.. Thanks in Advance |