j*****o 发帖数: 320 | 1 If I were you, I will use text for SSN and create another ID as PK. |
f********u 发帖数: 572 | 2 oh yes..I think SSN should be a text type. thanks. :)
【在 j*****o 的大作中提到】 : If I were you, I will use text for SSN and create another ID as PK.
|
n***n 发帖数: 10 | 3 自然是CHAR啦.你也不会用它来算算术.
【在 f********u 的大作中提到】 : oh yes..I think SSN should be a text type. thanks. :)
|
n***n 发帖数: 10 | 4
^^^^^^^^^^^^^^^^^^^^^^^ why?
【在 j*****o 的大作中提到】 : If I were you, I will use text for SSN and create another ID as PK.
|
c***y 发帖数: 114 | 5 but you may want to differentiate 123-45-6789 from abc-de-fghi
【在 n***n 的大作中提到】 : 自然是CHAR啦.你也不会用它来算算术.
|
g*****g 发帖数: 34805 | 6 Why don't just store xxxxxxxx in database,
trim the "-" before insert into database and
add it in display? The major advantage is
the verification of input.
【在 f********u 的大作中提到】 : oh yes..I think SSN should be a text type. thanks. :)
|
B**z 发帖数: 38 | 7 exactly
【在 g*****g 的大作中提到】 : Why don't just store xxxxxxxx in database, : trim the "-" before insert into database and : add it in display? The major advantage is : the verification of input.
|
n***n 发帖数: 10 | 8 好象有象0XX-XX-XXXX的SSN.
【在 g*****g 的大作中提到】 : Why don't just store xxxxxxxx in database, : trim the "-" before insert into database and : add it in display? The major advantage is : the verification of input.
|
n***n 发帖数: 10 | 9 如果要verify SSN, 总是要花一番工夫的.
如用数字,有012-34-5678的问题.而且显示时转换麻烦的.
感觉用CHAR类型,存012345678,检验起来容易,显示时
转换也不难.
【在 c***y 的大作中提到】 : but you may want to differentiate 123-45-6789 from abc-de-fghi
|