0 votes
856 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 881 views
0 votes
1 answer 882 views
0 votes
1 answer 3.5k views
0 votes
1 answer 1.2k views
0 votes
1 answer 1.5k views
0 votes
1 answer 1.4k views
...