473,587 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error in sql syntax - #1064

304 Contributor
DELIMITER $$

DROP PROCEDURE IF EXISTS `tableselect` $$
CREATE PROCEDURE `tableselect`()
BEGIN
select * from table_a;
END $$

DELIMITER ;

when i try to create a procedure by using the code specified above, i get this error.

#1064 - 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 'DELIMITER $$

DROP PROCEDURE IF EXISTS `tableselect` $$
CREATE PROCEDURE `' at line 1

i use mysql 5.0

any help would be appreciated.

thanks,
gomzi.
Apr 10 '07 #1
3 7113
ScarletPimpernal
39 New Member
Hi Gomzi,

Try this

mysql> DELIMITER $$
mysql> DROP PROCEDURE IF EXISTS `tableselect` $$ CREATE PROCEDURE `tableselect`()
Query OK, 0 rows affected, 1 warning (0.00 sec)

-> BEGIN
-> select * from table_a;
-> END;
-> $$
Query OK, 0 rows affected (0.00 sec)


Thanks,
Scarlet
Apr 11 '07 #2
masdi2t
37 New Member
DELIMITER $$

DROP PROCEDURE IF EXISTS `tableselect` $$
CREATE PROCEDURE `tableselect`()
BEGIN
select * from table_a;
END $$

DELIMITER ;

when i try to create a procedure by using the code specified above, i get this error.

#1064 - 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 'DELIMITER $$

DROP PROCEDURE IF EXISTS `tableselect` $$
CREATE PROCEDURE `' at line 1

i use mysql 5.0

any help would be appreciated.

thanks,
gomzi.

try cache your delimiter character with ;;

DELIMITER ;;

DROP PROCEDURE IF EXISTS `tableselect` ;
CREATE PROCEDURE `tableselect`()
....

DEMIMITER ;
Apr 13 '07 #3
masdi2t
37 New Member
try cache your delimiter character with ;;

DELIMITER ;;

DROP PROCEDURE IF EXISTS `tableselect` ;
CREATE PROCEDURE `tableselect`()
....

DEMIMITER ;
thus should change
Apr 13 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1517
by: Ola Ogunneye | last post by:
--=_104E0413.12733F99 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit I am running mysql 4.0.13 and using a weblog(Geeklog) to do my web. Using geeklog as been okay until I tried creating moderators to my forum and then I got the following error: 1064: You have an error in your SQL syntax. Check the manual that...
0
2799
by: Ola Ogunneye | last post by:
--=_075912CF.F899D547 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello again all, I have created an account in the particular database that I was trying to backup Using PHPMYADMIN and I also created the same user account on the OS side. I still got the same 1064 message afterwards. I am still relatively...
0
1193
by: Morten Gulbrandsen | last post by:
C:\mysql\bin>mysql -u elmasri -pnavathe company Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 to server version: 4.1.0-alpha-max-debug Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select database(); +------------+ | database() | +------------+
0
3030
by: Morten Gulbrandsen | last post by:
mysql> USE company; Database changed mysql> mysql> DROP TABLE IF EXISTS EMPLOYEE; -------------- DROP TABLE IF EXISTS EMPLOYEE -------------- Query OK, 0 rows affected (0.00 sec)
13
12219
by: wideangle | last post by:
Hello there! I know it's stupid, but when creating a table in a mysql (win32) database, it won't let me create this "mytable". Here goes my ER_PARSE_ERROR. mysql> CREATE TABLE `mytable` ( -> `mytable_id` int(25) NOT NULL auto_increment, -> `mytable_title` varchar(100) NOT NULL default '', -> `mytable_dts` varchar(25) NOT NULL...
0
1135
by: moishyyehuda | last post by:
whey when I execute this statment cursor.execute("""mysqlimport merchandise 1.txt""") I get this error ProgrammingError: (1064, "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 'mysqlimport merchandise 1.txt' at line 1") args = (1064, "You have an error in...
3
2922
by: dipperdan | last post by:
Hi, I'm getting an error 1064 when trying to delete some rows from a table. SQL is: DELETE FROM images WHERE image_id = 803 AND plant_num = 2277 LIMIT 1; DELETE FROM images WHERE image_id = 804 AND plant_num = 2277 LIMIT 1; DELETE FROM images WHERE image_id = 805 AND plant_num = 2277 LIMIT 1;
2
5405
by: tilenk | last post by:
Hello. I'm having a problem with restoring a mysql database for wordpress when moved to a new host. When I try to execute the following command DELIMITER ;; DELIMITER ; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET...
3
4949
by: phobia1 | last post by:
Hi once again. We have just changed our ISP and things that worked fine now do not, Obviously its in the differences of MYSQL and PHP versions. Have fixed most of the problems but this UPDATE routine has got me foxed. <?PHP // update.php require("./resources/globals.php") ; require("./resources/common.php") ; //echo $detail;
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.