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

Create table with enum

forums forums SQLyog SQLyog: Bugs / Feature Requests Create table with enum

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #7654
      jaygodse
      Member

      Hi.

      Besides typing in raw SQL, is there a way to create a table with enum fields in the GUI-based table creation utility? If so how? If not, it would be a neat feature.

      Cheers, Jay

    • #13636
      Ritesh
      Member
      Quote:
      Besides typing in raw SQL, is there a way to create a table with enum fields in the GUI-based table creation utility? If so how?

      Start the create table dialog…( press Insert after selecting a DB in the object browser or select Create Table In The Database… in DB menu )

      In the DATATYPE column table select ENUM and insert the ENUM values in LENGTH column.

      For eg if you want to create a field month with value January, February etc. then select enum in the DATATYPE column and give the following value in Length column –

      'January','February','March','April','May','June','July' etc.

      Hope it helps.

    • #13637
      sergius
      Member
      Ritesh wrote on Feb 3 2003, 09:47 AM:
      Start the create table dialog…( press Insert after selecting a DB in the object browser or select Create Table In The Database… in DB menu )

      In the DATATYPE column table select ENUM and insert the ENUM values in LENGTH column.

      For eg if you want to create a field month with value January, February etc. then select enum in the DATATYPE column and give the following value in Length column –

      'January','February','March','April','May','June','July' etc.

      Hope it helps.

      I just had the same problem. I guess the UI could be a little crearer about that 🙂

    • #13638
      peterlaursen
      Participant
      Quote:
      I just had the same problem. I guess the UI could be a little crearer about that

      It was proposed (by me, of course 😀 ) long time ago that the 'title' of the column in CREATE TABLE, ALTER TABLE and MIGRATION WIZATD changed from 'length' to 'values' with ENUMs and SETs. Ritesh clapped!

      But such GUI manipulation takes quite a lot of time to code. Probably is why it was never done. Other issues have been considered more important.

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