vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| am Tue, dem 05.12.2006, um 17:31:53 +0530 mailte deepak pal folgendes: > hi can we make a field auto incrementing field using Time Stamp data type On INSERT: set the default value for this field to now() For Update: create a trigger to do this. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| ||||
| On Tue, Dec 05, 2006 at 17:31:53 +0530, deepak pal <deepak.05pal@gmail.com> wrote: > hi can we make a field auto incrementing field using Time Stamp data type You can use a column default that uses current_timestamp for its expression. If you also want to handle updates or override cases where people supply values for that column, then you should look at using before triggers. ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org/ |