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

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -