phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] Re: timestamps with my MySQL in schema_pro


From: Chris Weiss
Subject: Re: [Phpgroupware-developers] Re: timestamps with my MySQL in schema_proc
Date: Wed, 11 Jun 2003 10:12:35 +0000

Michael Dean (address@hidden) wrote:
>
>On Tue, 2003-06-10 at 15:47, Chris Weiss wrote:
>> mysql only updates the first one, and doesn't allow null in any of them.  in
>> comparison, mssql only allows one per table and auto updated it with each 
>> update to
>> the row, doesn't allow defaults, and seems to allow null's, though it 
>> probably
>> tosses in the current timestamp no matter what.  I don't know that pg does 
>> but I
>> suspect it'll be yet another set of rules.
>
>The MSSQL timestamp doesn't really represent time either.  It is meant
>to be a guaranteed unique value for each row in a table.  To get a
>usable timestamp, you have to use datetime.

I've just started in on this part of mssql, never had a need before, but there 
is a
uniuqeidentifer type that when used with a default of newid() will give a GUID 
and
doesn't change for the row.  the timestamp is not just unique to the row, but 
also
unique to the UPDATE to the row and changes with every UPDATE.  I just even 
started
to look at this yesterday (doing a sync app...stupid mssql replication across
domains and no good way to do a trust over the client side vpn, bleh) so I 
haven't
looked at what this value represents but I expect it to be larger with each 
update
as some representation of passing time.

not that any of this is usefull in a cross platform way, just fun stuff to show 
that
all RDBMS are not only not equal but certain ones like to invent their own
definitions of what otherwise looks like standard features.  timestamp is not a
standard feature.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]