0 votes
103 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 82 views
0 votes
1 answer 81 views
0 votes
1 answer 2.5k views
0 votes
1 answer 321 views
0 votes
1 answer 854 views
0 votes
1 answer 707 views
...