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?
- Weekly Trends
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
- JavaScript functions Exercises
- Python Tutorial
- Python Array Exercises
- SQL Cross Join
- C# Sharp Array Exercises
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook