Delete Mysql Error 1064
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings mysql error 1064 42000 and policies of this site About Us Learn more about Stack Overflow mysql error 1064 insert the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags mysql error 1064 create table Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only
Mysql Error 1064 Create User
takes a minute: Sign up Can SELECT but can't DELETE up vote 0 down vote favorite I'm having difficulty deleting the desired rows from my table in MySQL. I'm using a rather complex subquery to select the rows, but for some reason I'm unable to delete them using a similar syntax. delete * from table1 as t1 where t1.col1 in mysql error 1064 sqlstate 42000 (select y.col1 from table2 x join (select col1, col2 from table2 where col2 like "%- 2%") y on x.col2 = replace(y.col2, "- 2", "")); Again, I can select the exact rows I wanted deleted, but when I change the query to delete I get the following 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... Any help is greatly appreciated. mysql join subquery sql-delete share|improve this question edited Aug 11 '15 at 13:05 Brian Tompsett - 汤莱恩 3,083112675 asked Aug 18 '11 at 21:22 leadingzero 17118 add a comment| 4 Answers 4 active oldest votes up vote 2 down vote accepted Remove the * after DELETE. You don't usually delete individual columns, you delete entire rows. share|improve this answer answered Aug 18 '11 at 21:24 yan 15.4k12345 wow. so much time spent on such a dumb mistake. thanks all! –leadingzero Aug 18 '11 at 21:32 add a comment| up vote 2 down vote yep, you should use delet
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn mysql error code 1064 more about Stack Overflow the company Business Learn more about hiring developers or
Mysql Error 1064 Create Trigger
posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow
Mysql Error 1064 Create Database
Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up MySQL error 1064, not sure what I'm doing wrong http://stackoverflow.com/questions/7114313/can-select-but-cant-delete here up vote -1 down vote favorite mysql -u username -p database -e deletedata.sql I get ERROR 1064 (42000) at line 1: 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 'deletedata.sql' at line 1 DELETE FROM 'table1' WHERE 'column' <= date_sub(current_date, INTERVAL 37 day); DELETE FROM 'table2' WHERE 'column' <= date_sub(current_date, http://stackoverflow.com/questions/1337001/mysql-error-1064-not-sure-what-im-doing-wrong-here INTERVAL 37 day); What could I be missing? mysql database mysql-error-1064 share|improve this question edited Feb 28 '10 at 19:59 OMG Ponies 198k36356415 asked Aug 26 '09 at 19:36 user163760 I tried both solutions and got the same errors...perplexing! –user163760 Aug 26 '09 at 20:00 Can you do a "describe 'table1'" from the MySQL console and paste your table schema here (or at least the relevant fields) so we can work directly with what you've got? –Brent Nash Aug 26 '09 at 20:45 add a comment| 3 Answers 3 active oldest votes up vote 0 down vote accepted -e executes a statement, not a sql file. What you need: mysql -u user -p pass db and then into the mysql cli: \. deletedata.sql Backslash dot means "source file" Or you can just pipe it: cat delete.sql | mysql -u user -p pass db share|improve this answer answered Aug 26 '09 at 20:33 K. Norbert 7,09523040 Thanks...the last think you said to try worked so I went back and looked at my syntax and checked the manual for mysql. This worked for me: mysql --user=user_name --password=your_password db_name > deletesql.sql Now one last question...there is no output...
DOMAINS WEB DESIGN WEB DESIGN SERVICES CREATE YOUR OWN WEBSITE SITE HOSTING TOOLS MEET US MEET US ABOUT US PARTNERS & AWARDS BLOG WE'RE HIRING http://www.inmotionhosting.com/support/website/database-troubleshooting/error-1064 CONTACT US AMP LOGIN SUPPORT CENTER Search Support Center Product http://www.techjamaica.com/forums/showthread.php?60654-MySQL-Error-1064-when-DELETEing Guides Dedicated Hosting Reseller Hosting KnowledgeBase Website Email Domain Names Reseller Billing Community Support Browse Questions Ask a Question User Submitted Articles Education Channels Android BoldGrid cPanel DokuWiki Drupal 7 Drupal 8 Everything Email Joomla 2.5 Joomla 3.1 K2 Magento 1.6 Mambo MediaWiki Moodle mysql error Movable Type OpenCart OpenCart 2.0 osCommerce PHP-Fusion PHP-Nuke phpBB phpList Premium Website Builder PrestaShop 1.5 PrestaShop 1.6 SMF Tiki Wiki VirtueMart 3 Web Hosting Manager Website Design WordPress Tools & Resources Email Configuration Blacklist Check Visual DNS Lookup Quick Tagger Icon Sets Favicon Generator Bounce Back Parser What is my IP address? >>Website .htaccess (17)Adobe mysql error 1064 Flash (2)APIs (2)Backup and Restore (15)Billing (8)Browser Issues (2)Connecting to a Database (5)cPanel (26)cPanel Account Management (16)Cron Jobs (4)Cube Cart (2)Database Setup (5)Database Troubleshooting (6)Domain Management (2)Dreamweaver (12)Drush (2)eCommerce (7)Elasticsearch (4)Fantastico (4)File Management (16)File Manager (6)FTP (10)FTP Client Setup (21)General Server Setup / Management (15)Getting Started Guides (18)Ghost (3)Google Tools (21)How To (23)HTML (2)Image Editing (2)IP Addresses (3)iWeb (1)JavaScript (2)Joomla (10)Joomla 2.5 (36)Koken (11)Linux (27)Logaholic (5)Magento (2)Maintaining Your Website (1)Managing Files (7)Microsoft FrontPage (11)Microsoft Publisher (1)ModSecurity (7) MODx (3)New Customers (7)Open Classifieds (1)PCI Compliance (7)PHP (15)PHP Configuration (7)PHP Troubleshooting (6)phpBB (25)phpMyAdmin (10)Premium Website Builder (22)Prestashop (1)Protecting Files (5)Publishing Your Site (2)Python (1)Redirects (4)Restricting Bots (5)Search Engine Optimization (1)Secure Socket Layer (SSL) Tutorials (13)Security (12)Sending Email From Websites (2)Server Security (2)Server Usage (21)Slow Websites (7)Social Media (4)Software FAQs (11)Soho Web Builder (18)SSH and Root access (21)Statistics/Logging (12)Troubleshooting Comment Spam (3)Troubleshooting Hacked Websites (9)Web Host Manager (7)Website Error Numbers (4)Website Is Unavailable (3)Website Transfers (6)Website Troubleshooting (26)Welcome to AMP (22)What Is... (9)WooCommerce (5)WordPress
sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 7 of 7 Thread: MySQL Error 1064 when DELETEing Thread Tools Show Printable Version May 7, 2008,01:08 PM #1 raymond View Profile View Forum Posts Newbie Join Date Jun 2005 Posts 28 Rep Power 0 MySQL Error 1064 when DELETEing I'm trying to carry out the following delete statements PHP Code: DELETEFROMimagesASiWHEREi.image_id=803ANDi.plant_num=2277LIMIT1
but i am getting the error: Code: 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 'AS i WHERE i.image_id = 803 AND i.plant_num = 2277 LIMIT 1; DELETE FROM images A' at line 1 any idea what is causing this because everything looks okay to me. Last edited by raymond; May 7, 2008 at 01:20 PM. "Any intelligent fool can make things bi
DELETEFROMimagesASiWHEREi.image_id=804ANDi.plant_num=2277LIMIT1
DELETEFROMimagesASiWHEREi.image_id=805ANDi.plant_num=2277LIMIT1