Tag: Database
-
Replacing first occurrence of certain characters in MSSQL database
This post is regarding how to replace first occurrence of one or more characters from database table Column. Suppose we have table named User with columns Id, Name, Phone Number as shown in the figure below. And contains records as shown in figure below: Now what I required to accomplish is replace the first ‘-‘…
-
MSSQL – Change default database by sql query
Dear reader, Recently I noticed in my daily work that every time I logged in MS SQL I was required to select the database which I had to work on and this was regularly in use by me and this lead me to find the solution to change the default database selection after I log…