0 votes
4 views
in MySQL by (500 points)
Some tables are using DEFAULT CURRENT_TIMESTAMP for create_time field. I want to select all my tables which use DEFAULT CURRENT_TIMESTAMP] in mysql

1 Answer

0 votes
by
Use,
SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_DEFAULT = 'CURRENT_TIMESTAMP'
-- AND TABLE_SCHEMA = DATABASE();

Related questions

0 votes
1 answer 6 views
0 votes
1 answer 9 views
0 votes
1 answer 2.5k views
0 votes
1 answer 254 views
0 votes
1 answer 823 views
0 votes
1 answer 676 views
...