SQLite Exercise: Select first 10 records from a table
Write a query to select first 10 records from a table.
Note : Assume the salary field provides the 'annual salary' information.
Sample table : employees
SQLite Code :
SELECT employee_id, first_name
FROM employees
LIMIT 10;
Output:
employee_id first_name ----------- ---------- 100 Steven 101 Neena 102 Lex 103 Alexander 104 Bruce 105 David 106 Valli 107 Diana 108 Nancy 109 Daniel
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 length of the employee names (first_name, last_name) from employees table.
Next: Write a query to get monthly salary (round 2 decimal places) of each and every employee?
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