mysql - New SQL column, with repeating value when new row created? -



mysql - New SQL column, with repeating value when new row created? -

i'm trying create sql column on database next rule:

on each new row in specific column, default value integer "1".

i know how utilize null/not null,

alter table {tablename} add together {columnname} {type} {null|not null} constraint {constraint_name} default {default_value}

but i'm stumped how row have default integer, i'm not experienced in sql , don't know search for!

simply fill in:

alter table your_table add together your_column integer not null default 1;

mysql sql

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -