• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 624
  • Last Modified:

Set default value for mysql tuple.

Hey,

I would like to create a default value FALSE for a mysql in the column flagged.


CREATE TABLE competition (

            B1 int(2),
            B2 int(3),
            B3 int(3),
            B4 int(3),
            B5 int(3),
            B6 int(3),
            username VARCHAR(8),
                             ???  flagged VARCHAR(6) default="FALSE",  ???
 foreign key (username) references user(username)            
                                    )Type = InnoDB;  
0
jabootyboy
Asked:
jabootyboy
1 Solution
 
jrb1Commented:
CREATE TABLE competition (

          B1 int(2),
          B2 int(3),
          B3 int(3),
          B4 int(3),
          B5 int(3),
          B6 int(3),
          username VARCHAR(8),
          flagged VARCHAR(6) default 'FALSE',
          foreign key (username) references user(username)          
                              )Type = InnoDB;  
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now