Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Saving Queries

forums forums SQLyog Using SQLyog Saving Queries

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #10621
      tamsinrm
      Member

      Hi,

      I'm pretty new to MySQL, database analysis, etc. I was wondering if there is a way to save queries with SQLyog. In Access, you can essentially save a query as a new table. The only thing I've been able to figure out how to do so far with SQLyog is to export it to Excel and then import it back in as a new table. Is there a better solution?

      Thanks!

      Tamsin

    • #25250
      peterlaursen
      Participant

      This is actually a MySQL question more than a SQLyog question!

      In MySQL (like in most databases) such 'saved query' is called a VIEW!

      The (most simple) SQL-syntax for creating a VIEW is

      CREATE VIEW `viewname` {some SELECT statement}.

      VIEWs are supported from MySQL 5.0.x. Once a VIEW is created you can query it like a table (with the restriction that not all VIEWs are updatable – refer to the MySQL documentation for details!)

      In SQLog “CREATE VIEW” is in the database menu/context menu. We will soon add an option to generate a VIEW from the GUI Query Builder (Enterprise feature only). Also the option to query the VIEW will be added to the Query Builder.

    • #25251
      tamsinrm
      Member

      Thanks for the answer. As you can tell, I'm pretty new to MySQL.

      I'm currently using a trial version of the SQLyog Enterprise, mostly because I want the GUI Query Builder to help me as I learn the command line stuff. I'm thinking of purchasing the Enterprise version once the trial ends because the query builder has been incredibly useful. Any idea when you plan to add the additional VIEW options to the Enterprise version? I doubt that alone will determine whether I purchase the program. I've found it very useful so far for lots of other reasons!

      peterlaursen wrote on Nov 9 2007, 03:59 AM:
      This is actually a MySQL question more than a SQLyog question!

      In MySQL (like in most databases) such 'saved query' is called a VIEW!

      The (most simple) SQL-syntax for creating a VIEW is

      CREATE VIEW `viewname` {some SELECT statement}.

      VIEWs are supported from MySQL 5.0.x. Once a VIEW is created you can query it like a table (with the restriction that not all VIEWs are updatable – refer to the MySQL documentation for details!)

      In SQLog “CREATE VIEW” is in the database menu/context menu. We will soon add an option to generate a VIEW from the GUI Query Builder (Enterprise feature only). Also the option to query the VIEW will be added to the Query Builder.

    • #25252
      peterlaursen
      Participant

      “Any idea when you plan to add the additional VIEW options to the Enterprise version?”

      I will ask the developer assigned with this for this detailed work-plan for the next months on Monday!

    • #25253
      peterlaursen
      Participant

      Sorry for the delay.

      I think in 3 weeks we will support VIEWS in Query Builder and Schema Designer.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.