473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

TimeStamp

Is there any reason at all to use a timestamp column in a table having
a primarykey column???
lq
Jul 20 '05 #1
2 2772
Yes! A time stamp tells us when something happened!
"Lauren Quantrell" <la*************@hotmail.com> wrote in message
news:47**************************@posting.google.c om...
Is there any reason at all to use a timestamp column in a table having
a primarykey column???
lq

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.647 / Virus Database: 414 - Release Date: 29/03/2004
Jul 20 '05 #2

"news.inspire.net.nz" <to***@maxnet.co.nz> wrote in message
news:oW*****************@news02.tsnz.net...
Yes! A time stamp tells us when something happened!

Except a timestamp as I believe Lauren is referring to doesn't record the
time, just a unique increasing value.

But, to answer Lauren's question, yes. If you have the possibility of more
than one process updating the row at a time.

For example, process A, does a select, notes the timestamp. Proceeds to
manipulate it. (perhaps requires user input, so encapsulating all this in a
transaction is not a good idea.)

Right before performing an update, it begins a transaction, selects the
current timestamp, compares it to what it had from earlier. If it's the
same, it performs the update and commits the transaction. If it's
different, it means someone else has already updated the row. In this case
it rolls back the transaction and informs the user.


"Lauren Quantrell" <la*************@hotmail.com> wrote in message
news:47**************************@posting.google.c om...
Is there any reason at all to use a timestamp column in a table having
a primarykey column???
lq

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.647 / Virus Database: 414 - Release Date: 29/03/2004

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: perplexed | last post by:
How do you convert a user inputted date to a unix timestamp before insterting it into your database? I have a form, with a textfield for a date that the user inputs in the format mm-dd-yyyy and...
2
by: Astra | last post by:
Hi All I know an SQL Server timestamp seems to be as useful as rocking horse for show jumping, but I'm hoping you know a 'fudge' to get me round a problem or at least confirm that it isn't...
2
by: rong.guo | last post by:
Hello Group, I am having a really weird problem... Can anyone tell the difference between Query 1 and Query 2 below? Why Query 2 excludes '2/28/2005'? Many thanks! create table a...
7
by: mybappy | last post by:
Hi: I am trying to use timestamp field of SQL Server to maintain concurrency. My problem is how do I store the timestamp value in my webform. The hidden field does not work as I get some cast...
2
by: Zygo Blaxell | last post by:
I have a table with a few million rows of temperature data keyed by timestamp. I want to group these rows by timestamp intervals (e.g. every 32 seconds), compute aggregate functions on the...
5
by: Prabu Subroto | last post by:
Dear my friends... I created some tables with field timestamp (datatype also timestamp). I mean, I want to have the data when each record inserted or modified in the tables. on MysQL, I just...
2
by: Russell Smith | last post by:
Timestamps support infinity. However if appears dates do not. When timestamps are cast to dates, there is no output. Is this an acceptable option or not? Below are a number of examples...
2
by: Reddog | last post by:
Hi all, I have a number of tables that I want 'timestamped' with both a modified and created 'timestamp' field. Ideally both fields should 'work if ignored' in insert and updates, thus the...
22
by: Mal Ball | last post by:
I hope I have the right forum for this question. I have an existing Windows application which uses a SQL Server database and stored procedures. I am now developing a web application to use the same...
7
by: JJ | last post by:
How do I set one field to have the updated timestamp, and another to have the created timestamp? I want to do this directly from code generated from DB Designer if possible?! JJ
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.