SQL exercises on employee Database: List the names of those employees starting with 'A' and with six characters in length
SQL employee Database: Exercise-105 with Solution
[An editor is available at the bottom of the page to write and execute the scripts.]
105. Write a query in SQL to list the names of those employees starting with 'A' and with six characters in length.
Sample table: employees
SELECT emp_name FROM employees WHERE emp_name LIKE 'A%' AND length(emp_name)=6;
emp_name ---------- ADELYN ADNRES (2 rows)
Sample Database: employee
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a query in SQL to list the no. of employees and average salary within each department for each job name.
Next: Write a query in SQL to list the employees whose name is six characters in length and third character must be 'R'.
What is the difficulty level of this exercise?
- New Content published on w3resource :
- 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