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

Dml Generation Of Current Table Schema

forums forums SQLyog SQLyog: Bugs / Feature Requests Dml Generation Of Current Table Schema

  • This topic is empty.
Viewing 5 reply threads
  • Author
    Posts
    • #12232
      COBAY
      Member

      Hi, all

      Is there DML generation feature of currently existing some table ?

      Create table ~~~~~

      Alter table ~~~~

      this feature is very need.

      but, this feature is none.

    • #31851
      peterlaursen
      Participant

      I am not sure I understand the problem!

      But (My)SQL syntax to get DDL for an existing table is

      Code:
      SHOW CREATE TABLE tablename;

      SQLyog displays this in the “Info” tab if a tabel is selected in teh Object Browser

    • #31852
      peterlaursen
      Participant

      OK .. you referred DML – not DDL. Plase explain better and I will try to reply.

    • #31853
      COBAY
      Member
      'peterlaursen' wrote:

      I am not sure I understand the problem!

      But (My)SQL syntax to get DDL for an existing table is

      Code:
      SHOW CREATE TABLE tablename;

      SQLyog displays this in the “Info” tab if a tabel is selected in teh Object Browser

      Ok,

      [attachment=1522:Snap30.png]

      when I mouse right click, the feature is none.

      “table schema generate script” menu is need.

      table scheme generate script :

      1.create table copy to clipboard.

      2.alter table copy to clipboard.

      …etc..

      I need a copy/paste feature for the sake of generate schema of a lot of tables.

      thanks.

    • #31854
      Aparna
      Member

      Hi,

      You could try the following options to get the create table statement in SQLyog:

      1. If you are interested in just viewing/copying the create table statement then select that particular table and click on the info tab. This will display the create table statement for you. If you want to copy it then select the option that reads text/detailed and copy the statement into the editor.

      2. If you want to duplicate the table then there is an easier option to do so. All you have to do is right click on the table, select more table operations and then select duplicate table structure/data . Once you select this, the duplicate table window will pop up. You have options to duplicate both the structure of the table and the structure and data as well. Please see the attached screen shots that will help you understand both the steps better.

      For alter table you can do the following as a work around.

      Right Click on the table and select alter table option/ Push F6 on the table. The alter table window will pop up. Alter the field that you want to and then click on preview option. You will be able to see the alter query and also you can copy and paste it into the editor.

      Please see the attached screen shot.(In the sample screen shot provided the data type of the Field name UpdateDate is modified to VARCHAR(50). After modifying and clicking the preview option you can see the alter query. Please see the screen shot alter_query )

      Please get back to us if you have further queries.

      Thanks and Regards,

      Aparna.

    • #31855
      COBAY
      Member
      'COBAY' wrote:

      Ok,

      [attachment=1522:Snap30.png]

      when I mouse right click, the feature is none.

      “table schema generate script” menu is need.

      table scheme generate script :

      1.create table copy to clipboard.

      2.alter table copy to clipboard.

      …etc..

      I need a copy/paste feature for the sake of generate schema of a lot of tables.

      thanks.

      ahh~~~

      already there was duplicate table feature.

      Thank you for your detail and easily description.

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