Most Asked SQL interview questions and answers for Java Developers with examples | Code Decode

preview_player
Показать описание
In this video of code decode we have covered most asked SQL Interview Questions and answers for java developer with examples for both freshers and experienced.

Udemy Course of Code Decode on Microservice k8s AWS CICD link:

Course Description Video :

Databases can be found in almost all software applications. SQL is the standard language to query a database. Thus most asked sql interview questions is a must go through before any java interview questions faced in real time

We live in a data-driven world: people search through data to find insights to inform strategy, marketing, operations, and a plethora of other categories. There are a ton of businesses that use large, relational databases, which makes a basic understanding of SQL a great employable skill not only for data scientists, but for almost everyone.

Structured Query Language or SQL is a standard Database language which is used to create, maintain and retrieve the data from relational databases like MySQL, Oracle, SQL Server, PostGres, etc

As the name suggests, it is used when we have structured data (in the form of tables). All databases that are not relational (or do not use fixed structure tables to store data) and therefore do not use SQL, are called NoSQL databases. Examples of NoSQL are MongoDB, DynamoDB, Cassandra, etc

How to find third height Salary is very frequently and most asked sql interview questions
What are Indexes and How to create an index in SQL? you will always face this as most asked sql interview questions

Indexes are database objects which help in retrieving records quickly and more efficiently. Column indexes can be created on both Tables and Views. By declaring a Column as an index within a table/ view, the user can access those records quickly by executing the index. Indexes with more than one column are called Clustered indexes.

Syntax:CREATE INDEX INDEX_NAME ON TABLE_NAME(COL1, COL2);
The syntax to drop an Index is DROP INDEX INDEX_NAME on TABLE_NAME;

Indexes are known to improve the efficiency of SQL Select queries
Suppose we need to search by employee name = Manoj
What goes on behind the scenes is Every single row is checked to see if the employee_name matches with Manoj. This effectively means that the entire table will have to be scanned (known as the full table scan).

An index is a data structure that stores the values for a certain specific column of a table and helps us avoid a full table scan.

Database Indexing in reality, allows us to cut down the number of rows/records that need to be examined when a select query with a where clause is executed.

Few DS are :
B-tree - Database indexes will also store pointers which are simply reference information for the location of the additional information in memory. Basically the index holds the company_id and that particular row’s home address on the memory disk.

The query looks for the specific row in the index; the index refers to the pointer which will find the rest of the information.

Index takes up additional space, so the larger the table, the bigger the index.
Every time you perform an add, delete, or update operation, the same operation will need to be performed on the index as well.

If we drop a table, does it also drop related objects like constraints, indexes, columns, default, views and stored procedures?

Yes, SQL server drops all related objects, which exists inside a table like constraints, indexex, columns, defaults etc.

But dropping a table will not drop views and sorted procedures as they exist outside the table.

Code Decode Playlists

Subscriber and Follow Code Decode

--------------------------------------------------------------------------------------------------------------------------------------

#sqlinterviewquestion #javainterviewquestions #codedecode
Рекомендации по теме
Комментарии
Автор

Hi, I was not able to find the best query for finding the nth highest salary of an employee, but with this video I found it very simple to remember, thanks for this video. Also, please proceed further with other SQL questions you mentioned at the last.

vinaykumarjashtadhi
Автор

Please upload further videos. It will increase the employment rate of India because your videos are gem.

sarthakpalsharma
Автор

Hello. Thanks a lot for the videos. Cheers.
Note: I guess there is a gaffe at 7:15: Indexes with more that one column are called "composite indexes", not "clustered indexes".

ahmetyasarozer
Автор

The way you teach is superb.. the concepts i wasn't able to grab after learning for days, you explain it so effectively that I understand it in a single watch.

shubhamraj
Автор

you are teaching in very good manner. loved your teaching style, keep uploading videos faslter, it is helping a lot to me others

GamingPitchWithParth
Автор

Hi I loved this video much!!!! Please please upload the second part as I've been waiting for this kinda stuff for a long time. <3 <3

rohinikumari
Автор

Thank you for all hard work you put.
Please cover triggers, partition, stored procedure and functions.

bhavikjoshi
Автор

Nice video mam. Please add more such videos on SQL. Will be waiting for your videos.Thanks for your efforts.

chaitalijuare
Автор

You Guys are awesome. It's day by day helping me to achieve my goal. Seriously, this channel is a gem and I've recommended it to my friends as well.
I have one request, please make a video on real time scenario java interview questions. Like techno - managerial or client rounds mostly which will ask questions on scenario based.
You're hell of a life & time saver. Bless you guys!!

darkresonance
Автор

Yes please continue this SQL series - really good. If possible do resume Microservices section - it's pending for more than 2 months 👍

karthikeyanrm
Автор

wonderful video 😍..very easily understandable

shruthishru
Автор

It was awesome explanation. Please do provide still more frequently asked sql questions.

jeevansaimanikanta
Автор

It is very good video to check out our Knowledge after learning. Thanks to #CodeDecode #Thanks

srujan
Автор

First I need to say thanks for such awesome videos in ur channel.Thanks a lot ..Please proceed to create more videos about SQL

anusuyadevi
Автор

Thanks for the Video, For the query to find Nth highest salary, I believe LIMIT will not work in all the DB's. Could you please explain using TOP too and is there any other approach too for the same?

harisharan
Автор

Amazing video to the point and various approaches to solve also 👍👍

sachintambeshwar
Автор

because of your channel, i am getting all interviews cleared.

kanhiyajoshi
Автор

If we have same salary then we should use GROUP BY Sal . It will handle duplicate Sal conditions also.

sidhanshuraghuvanshi
Автор

Thanks for the video....Nice one, Yes please make a continuation of this

dpkpk
Автор

First of all thanks a ton on starting this SQL series. I'm expecting video on angular interview questions, Please try to do a video on angular interview questions

maruthikumar