content management system - designing a web-cms database for an assignment -
i designing database system web cms. have added "status" column in "content" table shows status of each content in time. know there special values status can accept : 'draft', 'comment waiting', authorizing pending' and... want create check constraint make column accept above values. correct work? whole of status values can use in constraint?
use enum()
data type of status column. e.g.:
create table example ( ... status enum('draft','comment waiting','etc.') not null, ... );
Comments
Post a Comment