I'm trying to set up a DB for user registration and in want to have a column with the registration date in it, which should be the current time by default. I tried running this query:
CREATE TABLE `users` (
<some stuff>
`uRegDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
)
But it doesn't work with MariaDB. Anyone got a solution?
What if you change the datatype to TIMESTAMP
instead of DATETIME
like
`uRegDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With