By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,723 Members | 1,414 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,723 IT Pros & Developers. It's quick & easy.

Mysql Problem

P: n/a
Sorry to post this here, bu ive searched the web for this answer and cannot
find it and the mysql news groups are uesless.

If I have default on a colum of say TIMESTAMP, will "select now();" work?

Thanks
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

On 18-Apr-2004, "Hayden Kirk" <sp**@spam.com> wrote:
Sorry to post this here, bu ive searched the web for this answer and
cannot
find it and the mysql news groups are uesless.

If I have default on a colum of say TIMESTAMP, will "select now();" work?


It depends on what you mean by work.

"select now()" will return a row with a single column containing the current
date+time. It does not require a column of TIMESTAMP.

--
Tom Thackrey
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to ja*********@willglen.net (it's reserved for spammers)
Jul 17 '05 #2

P: n/a
Hi

What I mean is, if I do not assign anything to that column, would now() be
inserted successfully as default?

Thanks
- Hayden

"Tom Thackrey" <us***********@nospam.com> wrote in message
news:_i******************@newssvr27.news.prodigy.c om...

On 18-Apr-2004, "Hayden Kirk" <sp**@spam.com> wrote:
Sorry to post this here, bu ive searched the web for this answer and
cannot
find it and the mysql news groups are uesless.

If I have default on a colum of say TIMESTAMP, will "select now();"
work?
It depends on what you mean by work.

"select now()" will return a row with a single column containing the current date+time. It does not require a column of TIMESTAMP.

--
Tom Thackrey
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to ja*********@willglen.net (it's reserved for spammers)

Jul 17 '05 #3

P: n/a

On 18-Apr-2004, "Hayden Kirk" <sp**@spam.com> wrote:
What I mean is, if I do not assign anything to that column, would now() be
inserted successfully as default?


yes

--
Tom Thackrey
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to ja*********@willglen.net (it's reserved for spammers)
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.