-1
I have a table on mysql whose records can be created from different servers, these servers are configured as master and slave, and the id of each server has been defined as 1, 2, 3 etç. I wonder if it is possible to set the default value of a column to take the server_id from the server that is entering the log, something automatic like auto increment.
I tried to:
ALTER TABLE `mytable`
ADD COLUMN `somecolumn` TINYINT NULL DEFAULT server_id
But it doesn’t work.