๐Ÿ‘ฉโ€๐Ÿ’ป 75+ SQL Practice Questions

โ Oracle
โ MySQL
โ SQL Server
โ PostgreSQL
โ SQLite

โ‡ฉ

Topics covered:

โžŠ Table
โž‹ Constraints
โž€ Primary Key
โž Unique
โž‚ Not Null
โžƒ Default
โž„ Check
โž… Foreign Key
โžŒ Insert, Update, Delete
โž Select
โžŠ Table

โž€ Create a Table with a few fields by specifying their data types.

โž Add a field to an existing table.

โž‚ Modify a field's data type of a table.

โžƒ Rename a field's name.

โž„ Remove a field from a table.

โž… Rename a table's name.

โž† Drop a table.
โž‹ Constraints

โž€ Primary Key
โž Unique
โž‚ Not Null
โžƒ Default
โž„ Check
โž… Foreign Key
โž‹.โž€ Primary Key

โžค Create a Table with
โž€ a single field as the primary key
โž 2 or, more fields as the primary key
...

โžค Add a primary key to an existing table
โž‚ for a single field
โžƒ for 2 or, more fields
...
โž‹.โž Unique

โžค Create a Table with
โž€ a single field unique
โž 2 or, more fields combining unique
โž‚ multiple unique fields
...

โžค Add a unique constraint to an existing table
โžƒ for a single field
โž„ for 2 or, more fields combining
...

โž… Drop a unique constraint
โž‹.โž‚ Not Null

โžค Create a Table with
โž€ one NOT NULL field
โž multiple NOT NULL fields
...

โž‚ Add NOT NULL constraint to an existing field
โžƒ Remove NOT NULL constraint from an existing field
โž‹.โžƒ Default

โžค Create a Table with DEFAULT value(s)
โž€ for one field
โž multiple fields
...

โž‚ Add a DEFAULT value constraint to an existing field
โžƒ Remove DEFAULT value constraint from an existing field
โž‹.โž„ Check

โžค Create a Table with CHECK constraint for
โž€ a single field
โž 2 or, more fields combining
โž‚ multiple separated fields
...

โžค Add a CHECK constraint to an existing table
โžƒ for a single field
โž„ for 2 or, more fields combining
...

โž… Drop a CHECK constraint
โž‹.โž… Foreign Key

โžค Create a Table with
โž€ a single foreign key field
โž 2 or, more fields combining foreign key
โž‚ multiple foreign key fields
...

โžค Add a foreign key constraint to a table
โžƒ for a single field
โž„ for 2 or, more fields combining
...

โž… Drop a foreign key
โžŒ Insert, Update, Delete

โž€ Insert a row into a table.
โž Insert a row into a table by providing data for a few fields.
โž‚ Insert multiple rows at a time into a table.
โžƒ Insert into a table by selecting needed data from another table.
โž„ Update a specific field's data in a table.
โž… Update a field's data for multiple rows at a time.
โž† Delete a row from a table.
โž‡ Delete multiple rows from a table.
โž Select

โž€ Fetch all rows from a table.
โž Fetch only specific fields' data from a table.
โž‚ Fetch only those rows that match a condition.
โžƒ Apply multiple conditions.
โž„ Check if a field's data is NULL.
โž… Check if a field's data is not NULL.
โž† Check if a field's data starts with "NewY"
โž‡ Check if a field's data ends with "don"
โžˆ Check if a field's data contains "ijin"
โž‰ Check if a field's data has "a" at 2nd position
โž€โž€ Check if a field's data starts with "B" and, has at least 5 characters.
โž€โž Check if a field's data starts with "B" and, ends with "a".
โž€โž‚ Check if a field's data starts with "a" or, "o".
โž€โžƒ Check if a field's data doesn't contain "a" or, "o" at the 2nd position.
โž€โž„ Check if a field's data ends with any character from "m" to "t".
โž€โž… Check if a field's data is 1 or, 2 or, 3 or, 4 or, 5.
โž€โž† Check if a field's data is in the range of 10 to 30.
โž€โž‡ Check if a field's data is not in the range of 10 to 50.
โž€โžˆ Fetch only distinct data contained in a field.
20. Fetch only the first 10 rows.
โžโž€ Fetch rows from 21 to 40.
โžโž Find the minimum value of a field.
โžโž‚ Find the maximum value of a field.
โžโžƒ Find the average value of a field.
โžโž„ Find the sum of all values contained in a field.
โžโž… Find the number of rows fetched.
โžโž† Find the count of distinct data in a field.
โžโž‡ Fetch rows in ascending order for a field.
โžโžˆ Fetch rows in descending order for a field.
๐Ÿ Final Words

โฌ˜ Practice all these questions. Then, try to come up with your own questions by customizing all of these.

โฌ™ It's an ongoing series. I will share more practice questions on various topics of SQL. Stay tuned.

Happy Practicing. Happy Learning.
Hey ๐Ÿ‘‹

I am a Tech Educator and, Mentor from India ๐Ÿ‡ฎ๐Ÿ‡ณ

I am sharing Tutorials, Infographics, Cheat Sheets, Practice Questions, Project Ideas and Roadmaps on Web Development, DSA and, Databases.

To never miss anything, Follow Me โœ…

More from Swapna Kumar Panda

๐Ÿ›ฃ Beginner's Roadmap for Front-End

HTML & CSS โ†’ ๐Ÿ‘ฉโ€๐Ÿ’ป โ†’ JavaScript โ†’ ๐Ÿ‘ฉโ€๐Ÿ’ป
โ†“
๐Ÿ‘ฉโ€๐Ÿ’ป โ† React* โ† ๐Ÿ‘ฉโ€๐Ÿ’ป โ† Tailwind*
โ†“
TypeScript โ†’ ๐Ÿ‘ฉโ€๐Ÿ’ป โ†’ Next.js* โ†’ ๐Ÿ‘ฉโ€๐Ÿ’ป โ†’ ๐Ÿ

โ‡ฉ

What would we cover?

โžŠ HTML & CSS
โž‹ JavaScript
โžŒ CSS Frameworks
โž UI Frameworks
โžŽ TypeScript
โž Server-side Frameworks
โž Practice, Practice and, Practice
โž‘ Other Skills
โž’ Frequently Asked Questions

โžŠ HTML & CSS

โฌ˜ Your Front-End journey shall always start from HTML & CSS and, ends with these as well.

โฌ— Don't over burden yourself to learn everything at once. It's a continuous subject.

โฌ™ Do not separate HTML from CSS. That's


โž‹ JavaScript

JavaScript is essential. You should start with basics and move to complex subjects.

โ JavaScript Syntaxes
(preferably ES6 onwards)
โ HTML DOM API
โ Event Handling
โ Fetch


โžŒ CSS Frameworks

CSS Framework is necessary if you are planning to be a professional developer.

There are so many options available.

โ Tailwind CSS
โ Bootstrap
โ Chakra
โ Bulma
โ Foundation
โ Skeleton
โ Pure CSS

Start with anything. You can switch any time.

You May Also Like