Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Thursday, September 20, 2012

MySQL's REPLACE()


We are in habit of using str_replace() of PHP, but MySQL also provide replace function for same purpose. 
The REPLACE() function takes three parameters: 



  • The string or column name to do the replacement on 
  • What to look for 
  • What to replace it with

    SELECT REPLACE('My name is garav', 'garav', 'Gaurav.') as result;
    result: My name is Gaurav.

1 comment: