MySQL: default value of column from another table column
问题 Consider you have table USER which has primary key on field USER_ID . And every table in your db should contain MODIFIED_BY field with id of actual user. My aim is to specify default value on that field which equals id of user with appropriate name. F.E. you have user with name system and you want every record of every table to have id of this user in MODIFIED_BY field. As well you want all the new records to satisfy this. 回答1: Assuming that you are referring to other sorts of users than