SQLite Exercise: Get first name from employees table after removing white spaces from both side
Write a query to get first name from employees table after removing white spaces from both side.
Sample table : employees
SQLite Code :
SELECT TRIM(first_name)
FROM employees;
Output:
TRIM(first_name) ---------------- Steven Neena Lex Alexander Bruce David Valli Diana Nancy Daniel John Ismael Jose Manuel Luis Den Alexander Shelli Sigal Guy Karen Matthew Adam Payam Shanta Kevin Julia Irene James Steven Laura Mozhe James TJ Jason Michael Ki Hazel Renske Stephen John Joshua Trenna Curtis Randall Peter John Karen Alberto Gerald Eleni Peter David Peter Christopher Nanette Oliver Janette Patrick Allan Lindsey Louise Sarath Clara Danielle Mattea David Sundar Amit Lisa Harrison Tayler William Elizabeth Sundita Ellen Alyssa Jonathon Jack Kimberely Charles Winston Jean Martha Girard Nandita Alexis Julia Anthony Kelly Jennifer Timothy Randall Sarah Britney Samuel Vance Alana Kevin Donald Douglas Jennifer Michael Pat Susan Hermann Shelley William
Practice SQLite Online
Model Database
Structure of 'hr' database :
Improve this sample solution and post your code through Disqus.
Previous: Write a query to get the names (for example Ellen Abel, Sundar Ande etc.) of all the employees from employees table.
Next: Write a query to get the length of the employee names (first_name, last_name) from employees table.
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