2

I am trying to execute two select queries like this in SQLyog

SELECT * FROM `admin`
SELECT * FROM `student`

I got this error enter image description here

Then I tried adding semicolumn (;) at the end of first query

  SELECT * FROM `admin`;
  SELECT * FROM `student`

I am getting result of only second table

Then I tried this

  SELECT * FROM `admin`;
  SELECT * FROM `student`;

I got this error enter image description here

Where m i missing?

mr. super cool
  • 196
  • 1
  • 12
  • I want result from both tables – mr. super cool Mar 05 '16 at 05:31
  • [This link might be helpful for you](http://www.databasejournal.com/features/mysql/article.php/10897_1558731_2/Introducing-SQLyog-a-MySQL-Front-End.htm) – Ullas Mar 05 '16 at 05:35
  • @LearningMode : Why `join`? OP needs to get separate result set for each query. – Ullas Mar 05 '16 at 05:37
  • There are three methods of executing queries in SQLyog -- `Execute Current Query (F5)`, `Execute All Query(s) (Shift+F5)` and `Execute Selected Query (Ctrl+F5)`. If you have written multiple queries and want to execute a particular query, then place your cursor in the respective query and press `F5`. – Ullas Mar 05 '16 at 05:39
  • @Ullas this solution is not working. 'F5' is just refreshing object browser. Queries are executed using F9 – mr. super cool Mar 05 '16 at 05:50
  • @mr.supercool : select both the queries and execute using `Ctrl + F5` – Ullas Mar 05 '16 at 05:52

1 Answers1

7

Select(Ctrl+a) SQL query and try to execute..
There will be multiple Result tab for each result set as shown in image..,

enter image description here.

Sandip Patel
  • 501
  • 4
  • 14
  • @thanks it is working. I have selected all then click "F9" normally to execute query and it gives me the results with different tab for each query for all the queries. – Bhavin Thummar Dec 12 '19 at 06:12