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

  • Home
  • SEARCH
  • 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 6835361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:13:24+00:00 2026-05-26T23:13:24+00:00

How to run more statements in one query? E.g. — TABLE users — CREATE

  • 0

How to run more statements in one query? E.g.

-- TABLE users --
CREATE TABLE  `DTB`.`table1` (
  `id` int(11) NOT NULL auto_increment,
  ...
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1

CREATE TABLE  `DTB`.`table2` (
  `id` int(11) NOT NULL auto_increment,
  ...
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=cp1250

INSERT INTO `DTB`.`table1` VALUES 
...

INSERT INTO `DTB`.`table2` VALUES
...

I’m able to run each statements separately and it works, but I’m not able to create one sql script which creates whole database.

  • 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-26T23:13:25+00:00Added an answer on May 26, 2026 at 11:13 pm

    You need to separate each query by ;

    So this will not work:

    insert into foo values(10)
    insert into bar values('test')
    insert into test values(42)
    

    but this will:

    insert into foo values(10);
    insert into bar values('test');
    insert into test values(42);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whenever I try to create more than one table in actionscript, only the first
The following query takes more than 3 minutes to run because tables contain massive
I want to load one or more DLLs dynamically so that they run with
When a SQL batch returns more than one message from e.g. print statements, then
I ran a query to copy 18 million records from one table to another.
I'm currently generating SQL insert statements from more than one tables, and in the
I am working on the Executors in java to concurrently run more threads at
When a Thread is finished, you cannot run it once more, using start() method:
Our system will run on a local network with no more than 50 clients
It seems that I have more trouble getting standard Unix things to run on

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.