Toad World® Forums

GetDate() function equivalen on MySQL


#1

Hi,

Ipm working with MySQl and i need to found some function that let me use the current date when i´m creating a table. On SQL Server i use the GetDate() but here i dont know which one use.

Anybody knows which one i need to use.

Thanks…

MySQL Wizzard.jpeg


#2

unfortunately mysql hasn’t support this yet. so we cant set a function as the default value of a column in mysql create statement. :"(


#3

If you want the field to be updated automatically, you can use a timestamp datatype with “default current_timestamp” or “on update current_timestamp”.

Otherwise, let me know exactly what you are trying to do.

Linda