SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast nguip's Avatar
    Join Date
    Apr 2001
    Location
    Malaysia
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi..

    I got this mysql question, I tried these two query a few time, but it just seen to be working with me.. can you all tell me what's wrong ? Thnaks
    Code:
    ALTER TABLE table_name ADD COLUMN newfield DATE NOT NULL AFTER oldfield;
    
    CREATE TABLE table_name (
    id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    confirm ENUM DEFAULT 'N' NOT NULL);
    I use remote access from my local computer.
    Ngu I.P.
    Web Developer

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not quite sure what errors you're getting but I'll try to help you.

    Try changing this:
    confirm ENUM DEFAULT 'N' NOT NULL);
    to this (I believe this is the correct syntax for ENUMs):
    confirm ENUM('Y', 'N') DEFAULT 'N' NOT NULL);

    Tell me how that works.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •