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

Need help with enum fields

forums forums SQLyog Using SQLyog Need help with enum fields

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #8017
      spc_123
      Member

      within a table, if I create a field, say “status” choose type “enum” ( so I can have values such as, up, down, unmanaged)…whatever else I put in for length or default value, etc results in the following when selecting “alter table:”

      Error No. 1064

      You have an error in your SQL syntax near '8) DEFAULT 'up' NULL after `id`, drop primary key, add primary key (`id` )' at line 1

      If I delete the field, I am able to alter the table just fine.

    • #14478
      Ritesh
      Member

      It seems that you are not enclosing the values with ' . To give a valid set of option for ENUM field, provide them in the Length field in the following manner –

      'Yes','No' etc

      HTH

    • #14479
      spc_123
      Member

      THANK YOU RiTesh!!! Less filling Works great!

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