Error No 1064 Truncate Table
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 more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags 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 takes a minute: Sign up mysql truncating error up vote 0 down vote favorite Create procedure a06_generate_data( p_loop_count int, p_min int, p_max int, p_status char(1)) begin declare v_max int; declare v_min int; declare v_loop_count int; set v_max := p_max; set v_min := p_min; set v_loop_count := p_loop_count -- clear the results table for each run truncate table p_testbed.a06_rndData; Repeat insert into p_testbed.a06_rndData (col_value) values (floor(v_min + rand()*(v_max – v_min))); set v_loop_count := v_loop_count – 1; until v_loop_count <= 0 End Repeat; select col_value p_testbed.a06_rndData ; end; # This procedure is to insert random values starting from p_min to p_max with a total of p_loop_count values. But the problem is, there's an error around truncate: 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 'truncate table p_testbed.a06_rndData; Repeat insert into p_testbed.a0' I've searched online to check for the syntax for truncate, but I think I have this written correctly. Suggestions? Thanks. mysql syntax-error truncate share|improve this question asked Sep 23 '12 at 23:12 user1682055 43129 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted The problem is not with TRUNCATE TABLE, the line before is missing a semicolon: set v_loop_count := p_loop_count share|improve this answer answered Sep 23 '12 at 23:16 doublesharp 14.7k32039 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged mysql syntax-error truncate or ask your own question. asked 4 years ago viewed 403 times active 4 years ago Related 5Syntax error with mySQL query function to convert decimal grade to
Download Documentation Documentation Screencasts Support General Support Community Forums Bug Tracker Contact Us Extensions Partners Community Forums Board index ‹ Forumul Român Change font size Print view Search FAQ Register Login Error No: 1064 Forum pentru userii din Romania. Post a reply 2 posts • Page 1 of 1 Error No: 1064 by mirea1970 » Sun Dec 27, 2015 6:28 am La multi ani tuturor.Am incercat sa fac un Back-up din panoul de administrare al magazinului si cand am incercat sa restaurez am primit urmatorul mesaj:Notice: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TRUNCATE TABLE `oc_addist_extension`' http://stackoverflow.com/questions/12557076/mysql-truncating-error at line 1Error No: 1064TRUNCATE TABLE `oc_addist_extension` in /home/u640320366/public_html/system/database/mysql.php on line 50ma poate si pe mine ajuta cineva care a mai intalnit asa cevamc, mirea1970 Posts: 1Joined: Thu Dec 24, 2015 3:55 pm Top Re: Error No: 1064 by florinsith » Mon Jan 04, 2016 6:49 am Editeaza fisierul si sterge chestia asta de la inceput:  My Extensions - SuperTheme - Opencart templates - Opencart modules florinsith Posts: 4623Joined: Thu May 13, 2010 https://forum.opencart.com/viewtopic.php?t=156101&p=596026 12:36 pm Website Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Post a reply 2 posts • Page 1 of 1 Return to Forumul Român Jump to: Select a forum ------------------ Forum Rules General News & Announcements Hot Patches General Discussion FAQ & Tutorials Troubleshooting Install & Upgrades Install/Upgrade FAQ General Configuration Payment Themes Language & Currency Shipping Order Total Security & Server OpenCart 2.0 Support General Support Bug Reports Installation, Upgrade, & Config Support Template Support Extensions Support Modules Payments Shipping Order Totals Feeds Languages OpenCart 1.5+ Support General Support Bug Reports Installation, Upgrade, & Config Support Template Support Extension Support Modules Payments Shipping Order Totals Feeds Languages Development Feature Requests Concepts Integration Free Contributions Modifications Extensions Themes Languages vQmods Commercial Contributions Extensions Themes vQmods ÄŒeské forum Deutsches Forum Foro Español Forum français FÃ
Sign in Pricing Blog Support Search GitHub This repository Watch 196 Star 1,638 Fork 527 rappasoft/laravel-5-boilerplate Code Issues 10 Pull https://github.com/rappasoft/laravel-5-boilerplate/issues/78 requests 9 Projects 0 Wiki Pulse Graphs New issue php artisan db:seed error #78 Closed odyright opened this Issue Sep 14, 2015 · 22 comments Projects None yet https://gitlab.com/gitlab-org/gitlab-ce/issues/15259 Labels None yet Milestone No milestone Assignees No one assigned 7 participants odyright commented Sep 14, 2015 [Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1064 error no You have an error i n your SQL syntax; check the manual that corresponds to your MySQL server v ersion for the right syntax to use near 'CASCADE' at line 1 (SQL: TRUNCATE TABLE users CASCADE) Soufraz commented Sep 14, 2015 What are you trying to do? Did you change anything in default project? Can you post error no 1064 your code? Is better to help. :) odyright commented Sep 14, 2015 OK but which code precisly are you asking for? Soufraz commented Sep 14, 2015 Ow sorry. The title of issue. "php artisan db:seed" :D What is your mysql version? You only get the project and ran the seed? composer install and php artisan migrate thrown some error? odyright commented Sep 14, 2015 yes ...same thing Owner rappasoft commented Sep 15, 2015 You're only going to get that message if using PostgreSQL, if you want MySQL make sure all your settings are correct. I don't normally use PostgreSQL, so I haven't had the opportunity to check those conditionals in the seeders, there very well may be something wrong with the syntax. Anyone with PostgreSQL care to try a fresh install? odyright commented Sep 15, 2015 I use MySQL Owner rappasoft commented Sep 15, 2015 Something is not right. Is your default in database.php set to mysql? And not getting overridden by an environment variable or something
Issues 5,080 Merge Requests 390 Snippets Network Create a new issue Builds Commits Issue Boards Closed Open Issue #15259 opened 2016-04-14 19:10:12 UTC by Rick Gudmundson@rickg421 SQL Syntax Error in Backup Restoration I was in the process of creating a backup server to our primary, so I went about installing GitLab on the backup server (matching the production version). I created the backup archive on the production server and copied it in place on the backup. Upon running the restore rake task, I received a syntax error:
ActiveRecord::StatementInvalid: Mysql2::Error: 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 'keys' at line 1: DROP TABLE keys
I double checked the GitLab versions between the two servers, and the output (below) matched down to the SHA:
System information
System: Debian 8.4
Current User: git
Using RVM: no
Ruby Version: 2.1.8p440
Gem Version: 2.2.5
Bundler Version:1.11.2
Rake Version: 10.5.0
Sidekiq Version:4.0.1
GitLab information
Version: 8.6.1
Revision: a96d737
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://