forums › forums › SQLyog › Using SQLyog › Executing Multiple Sql Statements In The Query Window
- This topic is empty.
-
AuthorPosts
-
-
May 21, 2011 at 1:42 pm #12339Larry WoodsMember
I want to execute two SQL SELECT statements in the Query window and see the BOTH results displayed in the Result window. I have tried various “tricks” but can't get multiple SQL statements to execute and display their results.
Is this possible in SQLyog?
Thanks
-
May 21, 2011 at 3:53 pm #32274peterlaursenParticipant
Of course it is possibe. Click the 'double arrow icon (or use shortcut Shift+F5) to execute all queries. A RESULT tab will open for each query.
(maybe you should check the documentation from help .. help menu)
-
May 21, 2011 at 4:45 pm #32275Larry WoodsMember'peterlaursen' wrote:
Of course it is possibe. Click the 'double arrow icon (or use shortcut Shift+F5) to execute all queries. A RESULT tab will open for each query.
(maybe you should check the documentation from help .. help menu)
Well, I DID check the documentation and I am using the Query window for a LOT of debugging, consequently I have about 30 queries in the window, including DELETEs and INSERTS. The documentation says that Shift-F9 (AND NOT Shift-F5) will execute ALL queries. I read that to mean ALL queries in the window and NOT just the selected queries. If Shift-F5 (Shift-F9) will execute JUST the SELECTED SQL statements then it might be a good idea to say that! So, before I destroy my database, can you tell me (1) is it Shift-F5 or Shift-F9 and (2) will it execute ALL queries or just the SELECTED queries?
Thanks
-
May 21, 2011 at 4:50 pm #32276Larry WoodsMember'Larry wrote:
Well, I DID check the documentation and I am using the Query window for a LOT of debugging, consequently I have about 30 queries in the window, including DELETEs and INSERTS. The documentation says that Shift-F9 (AND NOT Shift-F5) will execute ALL queries. I read that to mean ALL queries in the window and NOT just the selected queries. If Shift-F5 (Shift-F9) will execute JUST the SELECTED SQL statements then it might be a good idea to say that! So, before I destroy my database, can you tell me (1) is it Shift-F5 or Shift-F9 and (2) will it execute ALL queries or just the SELECTED queries?
Thanks
While waiting for your answer I connected to a database and entered the following in the Query window:
SELECT * FROM table1 LIMIT 1;
SELECT * FROM table2 LIMIT 1
I tried just hitting Shift-F9 (AND Shift-F5) both with, and without the “;” at the end of the first SELECT statement. I also tried selecting the statements and NOT selecting the statements. The only action that produced any result was the one above (with the “;” at the end of the first SQL statement). By selecting the two SQL statements I got a result of ONE record; the record from table1. I did NOT receive any result from table2!
-
May 21, 2011 at 4:54 pm #32277Larry WoodsMember'Larry wrote:
While waiting for your answer I connected to a database and entered the following in the Query window:
SELECT * FROM table1 LIMIT 1;
SELECT * FROM table2 LIMIT 1
I tried just hitting Shift-F9 (AND Shift-F5) both with, and without the “;” at the end of the first SELECT statement. I also tried selecting the statements and NOT selecting the statements. The only action that produced any result was the one above (with the “;” at the end of the first SQL statement). By selecting the two SQL statements I got a result of ONE record; the record from table1. I did NOT receive any result from table2!
In snooping around I HAVE found the output from the second query under another “Result” tab. So I checked the documentation. Huh! Doesn't tell me that is where I should have found it! Other packages that I have used (MS Enterprise Manager) lists the results in a single “Results” window, which is what I was expecting since I wanted to compare results—which I would image most users would want to do.
-
May 23, 2011 at 6:36 am #32278AparnaMemberQuote:Is it Shift-F5 or Shift-F9
This depends on the options in the preferences that reads “Switch F9 and F5 functionality”. If this option is checked then shift+F5 will execute all queries instead of Shift+F9. This option is present in tools menu->preferences->others tab. On opening this you can push F1(which opens the help file) for more details.
Quote:In snooping around I HAVE found the output from the second query under another “Result” tab. So I checked the documentation. Huh! Doesn't tell me that is where I should have found it!When you have loaded multiple queries in the editor please push F1 and it is mentioned that “Each query would create a new tab for its resultset in the Result Window”.
Please see the attached screen shot for the preferences option. Thank you!
-
-
AuthorPosts
- You must be logged in to reply to this topic.