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

  Рет қаралды 138,772

Code Decode

Code Decode

Күн бұрын

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:
openinapp.co/udemycourse
Course Description Video :
yt.openinapp.co/dmjvd
SQL interview question and answer part 2 : • SQL Interview Question...
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
Most Asked Core Java Interview Questions and Answers : • Core Java frequently a...
Advance Java Interview Questions and Answers : • Advance Java Interview...
Java 8 Interview Questions and Answers : • Java 8 Interview Quest...
Hibernate Interview Questions and Answers : • Hibernate Interview Qu...
Spring Boot Interview Questions and Answers : • Advance Java Interview...
Angular Playlist : • Angular Course Introdu...
GIT : • GIT
Subscriber and Follow Code Decode
Subscriber Code Decode : kzbin.info?...
Linkedin : / codedecodeyoutube
Instagram : / codedecode25
--------------------------------------------------------------------------------------------------------------------------------------
#sqlinterviewquestion #javainterviewquestions #codedecode

Пікірлер: 132
@vinaykumarjashtadhi3107
@vinaykumarjashtadhi3107 2 жыл бұрын
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.
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks . Sure Vinay 🙂👍
@vengateshm2122
@vengateshm2122 2 жыл бұрын
Pls check out row number concept. We can also do with that approach.
@sarthakpalsharma4501
@sarthakpalsharma4501 2 жыл бұрын
Please upload further videos. It will increase the employment rate of India because your videos are gem.
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks a ton Sarthak 🤣🤣. Sure we will upload more videos 👍👍.
@manojpatil2457
@manojpatil2457 2 жыл бұрын
@@CodeDecode that cracked me up too 😂😂
@priteshbohrade8548
@priteshbohrade8548 2 жыл бұрын
A gem comment..
@ahmetyasarozer
@ahmetyasarozer Жыл бұрын
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".
@LT-js2yk
@LT-js2yk 2 жыл бұрын
Great video! one correction though.. Clustered indexes are indexes whose order of the rows in the data pages corresponds to the order of the rows in the index.
@shubhamraj2683
@shubhamraj2683 2 жыл бұрын
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.
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks a ton Shubham. It means a lot 🙂👍🙏🙏
@karthikeyanrm3446
@karthikeyanrm3446 2 жыл бұрын
Yes please continue this SQL series - really good. If possible do resume Microservices section - it's pending for more than 2 months 👍
@CodeDecode
@CodeDecode 2 жыл бұрын
Yes karthikeyan due to time crunch and festive season it is getting delayed we will surely upload it soon...
@rohinikumari4
@rohinikumari4 2 жыл бұрын
Hi I loved this video sooooooooooooooo much!!!! Please please upload the second part as I've been waiting for this kinda stuff for a long time.
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure, we will upload it soon. Thanks 🙂
@GamingPitchWithParth
@GamingPitchWithParth 2 жыл бұрын
you are teaching in very good manner. loved your teaching style, keep uploading videos faslter ,it is helping a lot to me others thankyou.....
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks for the nice words sagar
@bhavikjoshi1060
@bhavikjoshi1060 2 жыл бұрын
Thank you for all hard work you put. Please cover triggers, partition, stored procedure and functions.
@CodeDecode
@CodeDecode 2 жыл бұрын
sure bhavik we will try to cover it soon
@chaitalijuare6135
@chaitalijuare6135 2 жыл бұрын
Nice video mam. Please add more such videos on SQL. Will be waiting for your videos.Thanks for your efforts.
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure Chaitali 👍🙂
@sidhanshuraghuvanshi1
@sidhanshuraghuvanshi1 5 ай бұрын
If we have same salary then we should use GROUP BY Sal . It will handle duplicate Sal conditions also.
@priyankapaul5620
@priyankapaul5620 Жыл бұрын
Plz make vedio on pl/sql stored procedure interview questions
@dpkpk1573
@dpkpk1573 2 жыл бұрын
Thanks for the video....Nice one, Yes please make a continuation of this topic.....
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure we will upload more 👍👍. Thanks 🙂
@ahmadazeem7785
@ahmadazeem7785 2 жыл бұрын
You explain each and every concept so well.Thank you so much
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks ahmed
@akshaykubade4210
@akshaykubade4210 2 жыл бұрын
yes, plz mam make more videos on further topics of sql asap. It will be so helpful... and thanks..
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure 🙂👍
@anusuyadevi6256
@anusuyadevi6256 2 жыл бұрын
First I need to say thanks for such awesome videos in ur channel.Thanks a lot ..Please proceed to create more videos about SQL
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure wr will do that👍🙂
@jeevansaimanikanta782
@jeevansaimanikanta782 2 жыл бұрын
It was awesome explanation. Please do provide still more frequently asked sql questions.
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure Jeevansai 👍. Will do that 👍🙂
@vikassontakke4403
@vikassontakke4403 Жыл бұрын
Indexes are stored outside the table na?? Then how they can be deleted after dropping a table
@harisharan4188
@harisharan4188 2 жыл бұрын
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?
@CodeDecode
@CodeDecode 2 жыл бұрын
Ok will give more such options in next video 👍👍
@sachintambeshwar9712
@sachintambeshwar9712 Жыл бұрын
Amazing video to the point and various approaches to solve also 👍👍
@CodeDecode
@CodeDecode Жыл бұрын
Thanks Sachin
@chaitutom5789
@chaitutom5789 2 жыл бұрын
Can u do one video on ajax calls jdbc drivers using java client and serverside validations
@maruthikumar6811
@maruthikumar6811 2 жыл бұрын
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
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure we are planning to start front end iqs too 🙂👍
@sreejak6776
@sreejak6776 2 жыл бұрын
Tnx for the video
@shruthishru3553
@shruthishru3553 2 жыл бұрын
wonderful video 😍..very easily understandable
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks shruthi
@manoj47parmar
@manoj47parmar 2 жыл бұрын
Thanks for providing such video this is real helping me lot in interview preparation. Please create video on NOSQL db like: Cassandra,MongoDB also.
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure Manoj, we are planning to do that👍👍
@rudrapratapsingh213
@rudrapratapsingh213 2 жыл бұрын
Hi, I was not able to find the best query for finding the duplicate records in a table, also to show how many times all the columns have been repeatedly stored separately , can you create a video in which there would be much advance questions? Also I randomly found your channel and it's very helpful, this time I am looking to switch the job and by god's grace I found your channel and videos are very helpful to me.
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Rudra, yrs nice topics 👍will create video on this topic 🙂👍
@vengateshm2122
@vengateshm2122 2 жыл бұрын
Thanks for the great effort. Pls put videos covering the question mentioned in the last section of the video.
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure 🙂👍
@user-yt5co6qq8w
@user-yt5co6qq8w 4 ай бұрын
Hi, This is the wrong statement "Indexes with more than one column are called Clustered indexes". It is the case of the "composite index.".You can have only one clustered index in one table, but you can have one clustered index on multiple columns, and that type of index is called a composite index.
@vaibhavnagrale8550
@vaibhavnagrale8550 2 жыл бұрын
Ma'am really appreciate your hardwork and efforts .. 👍 Please make more video regarding this topic ..
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure Vaibhav, we are planning next part soon 👍🙂
@darkresonance1541
@darkresonance1541 2 жыл бұрын
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!!
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks a ton🙂. This means a lot us. Yes we are about to create a video on real time scenerios that are asked in interviews. Thanks for the suggestion 👍👍
@AllinOne-et2on
@AllinOne-et2on 2 жыл бұрын
Truely you guys are producing an awesome content which help to crack interview easily.Till now did a great job and keep going ❤️❤️
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks a ton 🙂👍
@kanhiyajoshi5346
@kanhiyajoshi5346 Жыл бұрын
because of your channel , i am getting all interviews cleared.
@CodeDecode
@CodeDecode Жыл бұрын
Many many congratulations on clearing your interviews Kanhiya 🎉🎉🎉🎊🎊. You rock👍. Keep learning keep shining ⭐✨⭐✨ Man
@saugatadey1248
@saugatadey1248 2 жыл бұрын
Yes we want more topics to cover...plss make a video...eagerly waiting.
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure Saugata, we will do that 👍👍
@srujan7350
@srujan7350 2 жыл бұрын
It is very good video to check out our Knowledge after learning. Thanks to #CodeDecode #Thanks
@CodeDecode
@CodeDecode 2 жыл бұрын
you're welcome srujan
@Priyankapatel-zm2vq
@Priyankapatel-zm2vq Ай бұрын
Your explanation is really good ❤❤
@CodeDecode
@CodeDecode Ай бұрын
Thanks
@MohitKhare
@MohitKhare Жыл бұрын
thanks for the video.
@CodeDecode
@CodeDecode Жыл бұрын
🙂🙂👍👍
@ravindracharyvadyarapu
@ravindracharyvadyarapu 2 жыл бұрын
Waiting for next video ... kindly upload more videos on SQL
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure ravindra we will upload the next part soon
@rakeshkachhadiya
@rakeshkachhadiya Жыл бұрын
Well explained.
@CodeDecode
@CodeDecode Жыл бұрын
Thanks
@bhavinmajethia7070
@bhavinmajethia7070 Жыл бұрын
keep up the great work!
@CodeDecode
@CodeDecode Жыл бұрын
Thanks
@AllinOne-et2on
@AllinOne-et2on 2 жыл бұрын
Please upload few more videos on SQL. Eagerly waiting for this videos
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure we will create it soon.....
@sunitapatil7394
@sunitapatil7394 2 жыл бұрын
Please cover remaining....you are the best teacher. 👌
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Sunita. Sure we will do that 🙂👍
@AmitSingh-tk1il
@AmitSingh-tk1il 2 жыл бұрын
Awesome question collection
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Amit 👍🙂
@DivyaMahiChennai
@DivyaMahiChennai Жыл бұрын
Ur video’s are excellent very useful 100% Please upload more videos
@CodeDecode
@CodeDecode Жыл бұрын
Thanks 🙂🙂 , sure 👍👍
@jyothsnagangarapu1096
@jyothsnagangarapu1096 2 жыл бұрын
super video ,could please create another video for other questions in sql
@CodeDecode
@CodeDecode 2 жыл бұрын
sure jona we will upload next video this week
@shikshadubey4082
@shikshadubey4082 2 жыл бұрын
Please add more series on most asked SQL interview questions.
@CodeDecode
@CodeDecode 2 жыл бұрын
sure shiksha you'll see next part in this week only
@sarvan5002
@sarvan5002 2 жыл бұрын
I expected few more SQL questions in this video, but it covered only two. if you can add more in ur future videos.
@CodeDecode
@CodeDecode 2 жыл бұрын
sure we will add more
@qa8355
@qa8355 2 жыл бұрын
Well explained 👍👍
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks 🙏
@naleenyadav
@naleenyadav 2 жыл бұрын
You are awesome..
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Naleen 🙂👍
@priyankasundar3497
@priyankasundar3497 11 ай бұрын
We more such fine tune and best practices in SQL
@CodeDecode
@CodeDecode 10 ай бұрын
Sure Priyanka 👍
@LaxmiKitchen
@LaxmiKitchen 2 жыл бұрын
Hi ,kindly cover other topics also and upload the videos very useful
@CodeDecode
@CodeDecode 2 жыл бұрын
sure laxmi we will cover it soon
@KumarGaurav-xDsoCH
@KumarGaurav-xDsoCH 2 жыл бұрын
First of all thanks a ton on starting this SQL series. I am expecting to refer only your videos, to brush up these topics. Waiting impatiently for next video 😁 Please help me in implementing Spring Security with OAuth 2 and JWT. Any references having flow the way you explain, will be helpful...!
@CodeDecode
@CodeDecode 2 жыл бұрын
These are very nice topics. Thanks for the suggestion👍🙂. We will upload these in security series 👍👍
@mohitsoni2919
@mohitsoni2919 2 жыл бұрын
Code decode is the best
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Mohit🙂👍
@VLearnAutomationLabs
@VLearnAutomationLabs 2 жыл бұрын
pl cover more ql interview questions and upload a video will be useful for us
@CodeDecode
@CodeDecode 2 жыл бұрын
Yes it's in queue 🙂👍
@kudumulasivaramakrishnared6379
@kudumulasivaramakrishnared6379 2 жыл бұрын
Please do a video on tricky string interview questions
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure 🙂👍
@sushantsharma687
@sushantsharma687 2 жыл бұрын
Please create a video on some data structures questions
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure Sushant 👍
@neerajagarwal3176
@neerajagarwal3176 2 жыл бұрын
Please upload a videos for tuning of SQL queries.
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure. It's a very useful topic. We will do that👍👍
@tejachowdary309
@tejachowdary309 2 жыл бұрын
Please add more of SQL queries for interview
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure we will create more videos on this
@shylashreec388
@shylashreec388 2 жыл бұрын
Please upload more videos on SQL.
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure shylashree we will upload it soon
@amitthakur-yo6xw
@amitthakur-yo6xw 2 жыл бұрын
Please make more videos on sql interview questions Mam
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure amit we will create it soon
@sivaramakrishna2602
@sivaramakrishna2602 2 жыл бұрын
What if there are duplicate salaries ?
@yashyadav5605
@yashyadav5605 Жыл бұрын
For third highest salary What if highest sal is get repeated?
@GrowwWithTime
@GrowwWithTime 2 жыл бұрын
which editor you are using
@CodeDecode
@CodeDecode 2 жыл бұрын
IDE for sql you mean?
@sudhanshuk.2627
@sudhanshuk.2627 2 жыл бұрын
Mam please Cover more questions on SQL
@CodeDecode
@CodeDecode 2 жыл бұрын
sure sudhanshu we will cover it soon
@chakradharchakri7827
@chakradharchakri7827 2 жыл бұрын
Part 2 or more videos from SQL
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure 👍 we will do that🙂👍
@swapnilkumar4157
@swapnilkumar4157 2 жыл бұрын
mam create more videos on sql pleaseeee
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure Swapnil 👍 wr will do today🙂
@humaripragati
@humaripragati 2 жыл бұрын
One correction-It is not possible to create an index on a view
@rahulsolanki__
@rahulsolanki__ 2 жыл бұрын
Nice approach, But what if there are same salary for 2 employees , 1, Ram , 12000 2, Aksha , 15000 3, Manish, 12000 4. Ritu , 10000 5, Rohit, 8000 Here third highest should be 10,000 ie 4th row
@CodeDecode
@CodeDecode 2 жыл бұрын
No, when ever u sort in descending order, no one expects that. Even if they does, u can use distinct. Right?
@alldemb9496
@alldemb9496 2 жыл бұрын
select * from employeee where salary =(select distinct salary from employee order by salary desc limit 0,1);
@ayyasamys1011
@ayyasamys1011 2 жыл бұрын
Appreciate your work.. Can you please upload a video for apache shiro authorization using dB tables and spring boot ? It will be very helpful. There is no proper examples found in google
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure 👍🙂
@ayyasamys1011
@ayyasamys1011 2 жыл бұрын
@@CodeDecode thank you
@personxyz1840
@personxyz1840 2 жыл бұрын
Is this mysql?
@CodeDecode
@CodeDecode 2 жыл бұрын
Yes
Best father #shorts by Secret Vlog
00:18
Secret Vlog
Рет қаралды 22 МЛН
KodeCamp 4.0 Intermediate NodeJs Class 17
1:51:26
KodeCamp Team
Рет қаралды 2
The 25 SQL Questions You MUST Know for Data Analyst Interviews
32:47
KSR Datavizon
Рет қаралды 200 М.
Practice SQL Interview Query | Big 4 Interview Question
14:47
Why do databases store data in B+ trees?
29:43
Arpit Bhayani
Рет қаралды 32 М.