MySQL String Exercises: Append to email field
MySQL String: Exercise-5 with Solution
Write a query to append '@example.com' to email field.
Sample table: employees
Code:
UPDATE employees SET email = CONCAT(email, '@example.com');
Sample Output:
EMAIL -------------------- [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] - - - - - - - - - - - - - - - - - - - - - -
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous:Write a query to display leading zeros before maximum and minimum salary.
Next:Write a query to get the employee id, first name and hire month.
What is the difficulty level of this exercise?
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework