Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4104262
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:05:45+00:00 2026-05-20T21:05:45+00:00

I am new to MySQL, and I have a script that is supposed to

  • 0

I am new to MySQL, and I have a script that is supposed to rename all tables to uppercase. I have an error in it , but I can’t figure out why it is not working. Any help is appreciated!

DECLARE a VARCHAR(100);
DECLARE done INT DEFAULT 0;

DECLARE cur1 CURSOR FOR 
    SELECT DISTINCT table_name 
    FROM information_schema.columns 
    WHERE table_schema='admin27_shop';

DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=1;

OPEN cur1;

read_loop: LOOP
    FETCH cur1 INTO a;
    IF done THEN
        LEAVE read_loop;
    END IF;

    CREATE TABLE CONCAT(a, '1') SELECT * FROM a;
    DROP TABLE a;
    RENAME TABLE CONCAT(a, '1') TO UPPER(a);
END LOOP;

CLOSE cur1;

UPDATE: The error message happens on line 1, at the declaration of the variable, says that there is a syntax error…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T21:05:46+00:00Added an answer on May 20, 2026 at 9:05 pm

    Must be my specific version of MySQL and the application. Closing this question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to MySQL and PHP. I have two tables, one to hold all
Have a script that I can copy and run in mysql shell just fine,
I'm very new to MySQL and I have a stored procedure that I'd like
So I have this JS form that creates a new record ( MySQL ,
I am new to MySQL, but I have used Oracle for some time. I
I have this script that only lets users enter a single tag but I
I have a PHP script that in every run, inserts a new row to
I have a email script that runs every 15 minutes and is supposed to
I have a script that seemed to work before but no longer does. It
I have a php script that takes hierarchical data from a mysql procedure and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.