Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Creating a TIMESTAMP column in MySQL
Creating a TIMESTAMP column in MySQL [message #32213] Sun, 01 May 2011 16:46 Go to previous message
bushman is currently offline  bushman
Messages: 134
Registered: February 2009
Experienced Member
Hi, all!

Is there any .sch file macro for CREATEing a column like
'`my_column_id` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP'
in a MySQL DB?

Is it what MySqlSchema.h macro TIMESTAMP(ts) does, i.e. creates a column that defaults to CURRENT_TIMESTAMP?

If so, could anyone give me an example on how to use it?

I've tried
TIME_ (MY_COLUMN_ID) TIMESTAMP("CURRENT_TIMESTAMP")
,
it compiled fine, but the resulting CREATE TABLE statement defaults column to NULL.

I've searched the documentation and this forum but couldnīt find anything.

Thank you all in advance!


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MySqlSession::GetTransactionLevel() implementation
Next Topic: fetch not reading into struct
Goto Forum:
  


Current Time: Sun Apr 28 15:06:14 CEST 2024

Total time taken to generate the page: 0.06226 seconds