Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

w2ksp4.exe, WwwxxXdbf, procmail "FROM_MAILER" patch, Use of assignment to $[ is deprecated at /usr/local/sbin/apxs line 86. , wwwxxx vim, mysql closing table and opening table, 800c5000, setgid operation not permitted, pciehp: acpi_pciehprm on IBM, WWWXXX.DBF

Links

XODOX
Impressum

#1: How can I get leading zeros in my PKey?

Posted on 2006-10-27 15:48:20 by Mark Drummond

SQL/PostgreSQL newb here ... I would like to have a primary key in a
table where the key is numeric, but has a retains leading zeros. The
pkey values should start at:

00000001

and increase from there. Is there a data type that will do this for me?
Or should I be storing this as text instead? Or should the leading zeros
be handled outside the database itself, perhaps by the interface?

Thanks,
Mark

Report this message