Click to See Complete Forum and Search --> : mysql query browser (newbie) - running multiple queries


tjawed
October 22nd, 2005, 02:20 PM
Okay so I am a complete noob to mysql.

I am trying to run the following statements in mysql query browser

DROP TABLE IF EXISTS `bedbugs`.`airports`;

CREATE TABLE `bedbugs`.`airports` (
`city` char(20) default NULL,
`country` char(20) default NULL,
`name` char(20) NOT NULL default '',
PRIMARY KEY (`name`)
);


basically two different queries through one query window.

I get the following 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 ';
CREATE TABLE `bedbugs`.`airports` (
`city` char(20) default NULL,
`cou' at line 1


Can someone explain what is going on. If I comment out either query - the other one runs fine (basically I can run one at a time).

Is this some sort of limitation of the query browser?
thanks in advance

srinika
October 22nd, 2005, 10:19 PM
I'm not a MYSQL guy, but just an idea,

Y don't u try with 2 queries with lesser number of characters (May be there is a limitation of number of characters)

So run the 2 Queries as


DROP TABLE IF EXISTS `bedbugs`.`a`;

CREATE TABLE `bedbugs`.`a` (
`c` char(20) default NULL
);


and see the result.

If it works go thru MYSQL documentation to c whether there is a way to increase the number of characters which query browser can hold.

wildfrog
October 23rd, 2005, 06:51 AM
In MySQL Query Browser you've got two different query "panes", the Query Area (http://dev.mysql.com/doc/query-browser/en/mysql-query-browser-tour-querybar-queryarea.html) that supports single queries only, and the Script Editor (http://dev.mysql.com/doc/query-browser/en/mysql-query-browser-tour-scripteditor-introduction.html) that supports multiple queries.

- petter