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

Call Sql Script From An Other Sql Script

forums forums SQLyog Using SQLyog Call Sql Script From An Other Sql Script

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #9265
      ftomi
      Member

      Hi,

      Is it possibile to call an sql script within a query? 🙄

      In mysql consol (mysql.exe) it's possibile:

      source x.sql

      or

      . x.sql

      calls x.sql. Such lines can be placed inside x.sql too so it can call other scripts too.

      Thomas

    • #19347
      peterlaursen
      Participant

      You are right:

      http://dev.mysql.com/doc/mysql/en/batch-mode.html

      MySQL command line client implements some functionality/commands that are not SQL commands themselves. Maybe the “source” command should be implemented in SQLyog editor? I am not sure.

      If you are running MySQL 5 you can put the batch script in a stored procedure and CALL it(). That is the “standard” way to do it.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.