sql server - How to remove the first character if it is a specific character in SQL -


i have table telephone has entries following:

9073456789101 +773456789101 0773456789101 

what want remove 9 start of entries have 9 there leave others are.

any appreciated.

while other answer working, i'd suggest try , use stuff function replace part of string.

update telephone set number = stuff(number,1,1,'') number '9%' 

sqlfiddle demo


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

VBA function to include CDATA -

php - Warning: file_get_contents() expects parameter 1 to be a valid path, array given 16 -