0
votes
0answers
37 views

Is there any way to set server-wide and schema-wide default row formats for InnoDB tables in MySQL?

Is there a way to set server-wide and database-wide default row formats? Currently it seems that I must specify ROW_FORMAT in CREATE TABLE or ALTER TABLE statements. Am I reading the documentation ...
2
votes
1answer
1k views

alter table (mysql) adding column with default value of space (' ')

On my Mac, using 5.5.11 MySQL Community Server (GPL) alter table foobaz add column ( extendedTitle varchar(3000) DEFAULT NULL, clasindxIndent int, spacedash1 enum (' ', '-', '1') default ' ', ...
3
votes
1answer
306 views

How can I get MySQL to use the value returned by a function as a default?

I have a pre-existing table that has a column to that can hold a UUID. I'd like to be able to define a default such that new rows coming in (from legacy systems) will still get a UUID defined, via ...
1
vote
2answers
2k views

How to set addtime(current_timestamp, '15:00:00') as MySQL timestamp column default value?

I want to set `addtime(current_timestamp, '15:00:00') as the default value of one MySQL table column. I tried to do this with the following command but failed: mysql> alter table mytable change c1 ...