Re: [SQL] Generic design: char vs varchar primary keys

2011-08-05 Thread Jasen Betts
On 2011-08-04, Raj Mathur (=?utf-8?b?4KSw4KS+4KSc?= =?utf-8?b?IOCkruCkvuCkpeClgeCksA==?=) wrote: > Thanks, that's useful for benchmarking the various textual data types. > Anything specific about using CHAR vs VARCHAR for primary keys that are > going to be referenced from multiple tables tha

Re: [SQL] Generic design: char vs varchar primary keys

2011-08-05 Thread Jasen Betts
On 2011-08-03, Raj Mathur (=?utf-8?b?4KSw4KS+4KSc?= =?utf-8?b?IOCkruCkvuCkpeClgeCksA==?=) wrote: > Hi, > > Can you point me to any pages that explain the difference between using, > say CHAR(8) vs VARCHAR(8) as the primary key for a table? Is there any > impact on the database in terms of: lo

Re: [SQL] Calculating relative time/distance from CURRENT_TIMESTAMP

2011-08-05 Thread Gnanakumar
> If you really want a flexible function for doing this, I suspect you could replicate the functionality of jquery's 'timeago' module in a stored proc relatively easily. http://timeago.yarp.com/ It is MIT licensed, so you can copy the logic without restriction.  It makes reference to being derivati