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 -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -