Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

MYSQL Update Question

Avatar of djsoltan
djsoltan asked on
Microsoft SQL ServerOracle DatabaseMySQL Server
6 Comments1 Solution236 ViewsLast Modified:
Hi guys,

here is what our table looks like now

id  |   path
1   |   abc.html
2   |  
3   |   def.html          

and here is what i want to update it to be like

id  |   path
1   |   http://www.mysite.com/abc.html
2   |  
3   |   http://www.mysite.com/def.html 

now if you notice, the row 2 has no value in it. the update statement should NOT add http://www.mysite.com/ to the row if that row is empty, it should ONLY add it if there is already some value inside it and add it to the begining of the row.

can you please help with the sql statement?

thanks in advance
Avatar of appari
appariFlag of India image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answers