Basic Tricky SQL Questions to be asked in Interviews

Abhishake Bavisetti
2 min readJun 24, 2023

--

Hi Readers, In this blog am going to share few tricky sql interview questions which are pretty basic but we might often fail to prepare this questions for interview

Lets Pick a TABLE Named — Users

Users Table

Question 1: How to show only even records in the output?

Only Even records

Question 2: How to show only odd records in the output?

only odd rows

Question3: How to create a New table from Existing Table

Existing Table — users

New Table — users_new

Question4. How to create a New table from existing Table with empty rows

New Table with empty rows

Question 5. How to DELETE certain rows from a table

Lets take a table name users_new with 4 rows, Now we want to delete 3rd row from the table

Question6. How to truncate a table?

Now, you can see the entire table is truncated but the structure of the table remains the same

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Abhishake Bavisetti
Abhishake Bavisetti

Written by Abhishake Bavisetti

Blogger | Cricket Fanatic | Data Analyst | Loves Playing with Numbers | https://crickpulse.blogspot.com/

No responses yet

Write a response