|
Replies:
2
-
Pages:
1
-
Last Post:
Mar 21, 2011 4:17 PM
by: Linda
|
Threads:
[
Previous
|
Next
]
|
|
Posts:
1
Registered:
6/28/10
|
|
|
|
GetDate() function equivalen on MySQL
Posted:
Jun 28, 2010 9:14 AM
|
|
|
|
|
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..
|
|
|
Posts:
1
Registered:
3/20/11
|
|
|
|
Re: GetDate() function equivalen on MySQL
Posted:
Mar 21, 2011 12:18 AM
in response to: Kparada
|
|
|
unfortunately mysql hasn't support this yet. so we cant set a function as the default value of a column in mysql create statement. :"(
|
|
|
Posts:
20
Registered:
2/16/10
|
|
|
|
Re: GetDate() function equivalen on MySQL
Posted:
Mar 21, 2011 4:17 PM
in response to: Kparada
|
|
|
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
|
|
|
|
Legend
|
|
Guru: 2001
+
pts
|
|
Expert: 751
- 2000
pts
|
|
Enthusiast: 31
- 750
pts
|
|
Novice: 0
- 30
pts
|
|
Moderators
|
|
Helpful answer
(5 pts)
|
|
Answered
(10 pts)
|
|