0

I have zip code information and several observations have more than five digits. I want to keep the first five digits starting from the left. I want to edit the current table I am using, MyTable.

ZIP

29405

23471

2745000000

4738497823

I want it to look like this (keep first five digits starting from the left)

ZIP

29405

23471

27450

47389

4

1 回答 1

3

使用左函数的一种方法

update mytable
set zip = left(zip,5)

您也可以使用子字符串,在 Books On Line 中查找这两个函数以查看它们的用法

于 2013-06-12T13:01:07.050 回答