Top 25 SQL Server Interview Questions - .NET C#

  Рет қаралды 120,197

Interview Happy

Interview Happy

Күн бұрын

Пікірлер
@markippo
@markippo Жыл бұрын
Couple things that catched my eyes. 1) Primary Key always creates a clustered index - no, only if CI dosen't exist, if it does nonclustered unique is created. 2) clustered is faster than nonclustered - it depends on what we're doing. If we searching only for indexed columns or non indexed are included into nonclustered index - they will be performing the same or nonclustered will be faster... Overhead is only when nonclustered index needs take rest of the data from a heap or clustered index... 3) Cross join is also part of sql server logical joins (in documentation at least). Logical joins are a wage topic. Some people will also include any operation that is based on physical joins so semi joins, set operations (union, intersect, except, concatenation as union all), aggregates are also included. 4) Self Joins... Oracle people talk a lot about it... I've never heard this phrase in a sql server community... 5) Drop table could be also rolled back in sql server. Answer to this question: Dml VS ddl. Operation on data itself vs definition of the data. Dml are fully logged, ddl minimal... 6) Nth salary... Order by clause is not allowed in derived tables (subqueries). What if more than one person has the same salary? Use dense_rank 7) Consistency stands for capability of rdbms to be consistent apart from transaction result. So if transaction passes - save the data, if not or was hanged - roll itself back to the former state... It is quite obvious when everything's fine but it's really crucial after server crush... After reboot consistency of every db is checked... It has 3 phases - Analysis (what needs to be committed, what needs to be rolled back) Redo - store committed but not saved transactions. Undo - rollback uncomited transactions that were saved (it's called "dirty pages) - it happens when server operates under memory pressure - data are stored despite they're not committed... 7) Improving performance: 1) look at obvious issues with your query/procedure. Do some stuff. It if helped - you're good to go, if not 2) look at estimated execution plan - apply some indexes etc. 3) look at real execution plan - check if your sp is not victim of parameters sniffing etc. 8) memory consumption isn't so important with cursors... Thier iterative nature is... They're terribly slow compered to set/batch operations. That's why never use cursors unless you need to.
@aditijain70
@aditijain70 Жыл бұрын
Great Explanation! I gave an interview just a few days back and all the questions were explained here except for one or two. Thank you!
@interviewhappy
@interviewhappy Жыл бұрын
Thanks Aditi
@aravindnaveena5750
@aravindnaveena5750 Жыл бұрын
What position ?
@pallavipawankar9705
@pallavipawankar9705 2 жыл бұрын
This is a great video for interview purpose. Thanks a lot!
@interviewhappy
@interviewhappy 2 жыл бұрын
wc Pallavi.. and thanks for your comment
@ShreyanshiTimes
@ShreyanshiTimes Жыл бұрын
Though i am familiar with SQL server quite few years, still lot of points to learn with your video, really nice content. thanks.!
@interviewhappy
@interviewhappy Жыл бұрын
Great to hear! Thanks @Arm_luckyno23
@Manithan123
@Manithan123 Жыл бұрын
Great video. Thanks for sharing! There is a minor correction in the video on Delete vs Truncate. While the Delete can be rolled back Truncate can't be rolled back. The video incorrectly mentions that both can be rolled back.
@interviewhappy
@interviewhappy Жыл бұрын
Thanks Nallavan for sharing.
@sayujyakasekar3852
@sayujyakasekar3852 Жыл бұрын
Check in MS SQL server it can be rollback
@kesavanmechanical
@kesavanmechanical 2 жыл бұрын
Very information and useful for my SQL interviews. Thanks Happy.
@interviewhappy
@interviewhappy 2 жыл бұрын
That is my objective Kesavan, all the best for your interviews.
@kanchanapatil3804
@kanchanapatil3804 4 ай бұрын
@@interviewhappy
@soop9392
@soop9392 8 ай бұрын
Need interviewer like you who knows logic is magic. some interviewer patterns makes us to loose confidence who expect bookish answers
@sunilbabu2970
@sunilbabu2970 3 ай бұрын
❤❤
@vidhyadharmote2989
@vidhyadharmote2989 Жыл бұрын
Seriously..you have explained very nicely, it's very useful 😊 thank you !
@interviewhappy
@interviewhappy Жыл бұрын
Your Welcome . Glad you liked it Vidhyadhar.
@jamunadevi7635
@jamunadevi7635 2 жыл бұрын
Thanks sir..coming Saturday I have interview ..I am watching your videos and preparing . I can easily understand your explanation
@interviewhappy
@interviewhappy 2 жыл бұрын
Thanks Jamuna, best of luck, if you know any answer try to elaborate it as much as possible.
@veerabhadrarao258
@veerabhadrarao258 2 жыл бұрын
@@interviewhappy how to reach u brother 🙂
@interviewhappy
@interviewhappy 2 жыл бұрын
@@veerabhadrarao258 whatever queries you have regarding interviews - careers.. just post it here and we can discuss.
@veerabhadrarao258
@veerabhadrarao258 2 жыл бұрын
@@interviewhappy i need personal support frm you
@interviewhappy
@interviewhappy 2 жыл бұрын
@@veerabhadrarao258 this is my email id anuragrawat123@gmail.com. We can discuss on email.
@ankitbisht3794
@ankitbisht3794 Жыл бұрын
I think unique key cols can have multiple null values?
@satishdan
@satishdan 2 жыл бұрын
Hello you said Truncate can be rollback, but actually Truncate cannot be rollback. By the way excellent video and appreciate your efforts
@sandeepbhandigare3589
@sandeepbhandigare3589 2 жыл бұрын
Truncate can be rolled back. You might be referring DROP command
@sayujyakasekar3852
@sayujyakasekar3852 Жыл бұрын
Check in SQL server it can be rollback
@ashleygahl3638
@ashleygahl3638 Жыл бұрын
Truncation can rolled back if used inside a transaction
@Mr.Ash-cz9rf
@Mr.Ash-cz9rf Жыл бұрын
Most of the places it's showing truncate can't be rollback.
@rasikasamith
@rasikasamith 2 жыл бұрын
Thank you a lot for the effort to make this valuable video. Keep it up.
@interviewhappy
@interviewhappy 2 жыл бұрын
wc and Thanks Rasika. Wish you all the best for your career.
@jyothip1629
@jyothip1629 Жыл бұрын
Hi Sir, Thank you so much for these wonderful videos. Could you please make a video on How To Return A Value From A Stored Procedure in Sql Server.
@interviewhappy
@interviewhappy Жыл бұрын
Hi Jyothi, use out parameters is the answer.
@adilkevin6220
@adilkevin6220 Жыл бұрын
What to do if the auto-increment value reaches its limit?. Considering that it's a banking application I don't want to delete the older data how are you going to resolve the issue?
@interviewhappy
@interviewhappy Жыл бұрын
Now a days GUID are used for ID's. That will never let that problem happen.
@fahimakhtar6926
@fahimakhtar6926 2 жыл бұрын
great knowledge for interview . ❤❤
@interviewhappy
@interviewhappy 2 жыл бұрын
Thanks Fahim. Wish you all the best for your career.
@a2zguide216
@a2zguide216 28 күн бұрын
But , If we can Insert or update the data of View also be updated to the original table, then what's the benefit pf View..?
@rathika.m2362
@rathika.m2362 2 жыл бұрын
Can you please do Video for Azure.. Your videos are really useful for us.. Thank you for your effort
@interviewhappy
@interviewhappy 2 жыл бұрын
Sure Rathika, soon I will
@totoro3439
@totoro3439 2 жыл бұрын
Sir can you do normalisation video with practical examples ? Thank you
@interviewhappy
@interviewhappy 2 жыл бұрын
I will try soon
@SatinderSingh-cp6hn
@SatinderSingh-cp6hn Жыл бұрын
Again very nice collection and well explained.. 😇😇
@interviewhappy
@interviewhappy Жыл бұрын
Thanks a lot 😊 Satinder
@vigneshvk4940
@vigneshvk4940 Жыл бұрын
Can you please create a video about C# design pattern interview questions
@interviewhappy
@interviewhappy Жыл бұрын
Yes vignesh soon will update . Stay connected
@sonaldeshbhaket6698
@sonaldeshbhaket6698 Жыл бұрын
Your book has kindle addition only . I want paperback book of interview questions. Please tell me how can i get the book.
@interviewhappy
@interviewhappy Жыл бұрын
Sorry Sonal, the paperback is not available right now. May be in future. All the best for your career.
@Nenunenu-f3e
@Nenunenu-f3e Жыл бұрын
super bro
@interviewhappy
@interviewhappy Жыл бұрын
Thanks bro. All the best for your career.
@nomikhan2646
@nomikhan2646 Жыл бұрын
we use insert update delete in the sp and cannot in the function this point is wrong broh in your video
@interviewhappy
@interviewhappy Жыл бұрын
you are right
@nishasrivastava2970
@nishasrivastava2970 3 ай бұрын
At 42.07 you said that we can't use SELECT, INSERT, UPDATE, DELETE with SP and can use with Function. That's wrong. Only SELECT statement can be use with Function.
@duo_the_explorer
@duo_the_explorer 7 ай бұрын
Awesome video sir
@interviewhappy
@interviewhappy 7 ай бұрын
Thanks
@balajirk4572
@balajirk4572 2 жыл бұрын
Thank you so much
@amrutapatil2251
@amrutapatil2251 2 жыл бұрын
Thank you so much sir
@interviewhappy
@interviewhappy 2 жыл бұрын
Welcome Amruta. All the best.
@kevinwtao5321
@kevinwtao5321 2 жыл бұрын
Hi,Mr.: All are perfect, however, Q24for '"Truncate rollback " seems like "not rollback"
@interviewhappy
@interviewhappy 2 жыл бұрын
Thanks Kevin, I will cross check that question.
@bhargavisunchu6500
@bhargavisunchu6500 2 жыл бұрын
Can you do video on .Net core please. nice videos
@interviewhappy
@interviewhappy 2 жыл бұрын
Thanks Bhargavi. I already created videos on .NET Core also. You can check in my channel.
@chathurangawickramasinghe9727
@chathurangawickramasinghe9727 2 жыл бұрын
TRUNCATE reset the auto increment IDs but DELETE not
@interviewhappy
@interviewhappy 2 жыл бұрын
Good point Chaturanga
@adilkevin6220
@adilkevin6220 Жыл бұрын
There was one question why we are using cursor instead of a while loop?
@interviewhappy
@interviewhappy Жыл бұрын
In 90% cases we can replaced cursor with loops and that is recommended because cursor is performance heavy. I just wanted to explain cursor, that's why :)
@adilkevin6220
@adilkevin6220 Жыл бұрын
@@interviewhappy I was asked this question in the interview? Why cursor when we can use while loop. What should be the answer for this question ?
@abhishekjamwal6781
@abhishekjamwal6781 9 ай бұрын
Thank you so much sir
@interviewhappy
@interviewhappy 9 ай бұрын
Most welcome
@kansaascollection
@kansaascollection 9 ай бұрын
Difference between table variable and cte
@funandfood_hyderabad
@funandfood_hyderabad 6 ай бұрын
Thank you 😊
@interviewhappy
@interviewhappy 6 ай бұрын
You're welcome 😊
@PruthvirajPatil-v7r
@PruthvirajPatil-v7r Жыл бұрын
SIr please make video on user defined function and its types
@interviewhappy
@interviewhappy Жыл бұрын
Sure I will try to cover that in future.
@Dot-Net_Dev
@Dot-Net_Dev Жыл бұрын
Logic is tha Magic
@interviewhappy
@interviewhappy Жыл бұрын
Yup
@gkmishra2009
@gkmishra2009 Жыл бұрын
please make video on azure interview
@interviewhappy
@interviewhappy Жыл бұрын
Sure will try to do it soon@gkmishra2009
@mageking4343
@mageking4343 2 жыл бұрын
thanks sir
@interviewhappy
@interviewhappy 2 жыл бұрын
wc King
@harshanaini1509
@harshanaini1509 9 ай бұрын
very helpful vidoe
@interviewhappy
@interviewhappy 9 ай бұрын
Glad you think so!
@pallavipawankar9705
@pallavipawankar9705 2 жыл бұрын
What is Normalization in SQL?
@interviewhappy
@interviewhappy 2 жыл бұрын
When you create your application database tables from scratch, then you have to follow some rules - 1NF, 2NF, 3NF, BCNF... If you will not follow these rule, then later when data is filled in those tables.. you will face difficulty in managing that data.
@FunAndCreativeCorner
@FunAndCreativeCorner 2 жыл бұрын
Shared one email regarding interview questions I faced last week sir. Please give reply.
@interviewhappy
@interviewhappy 2 жыл бұрын
Oh, that's you, I already replied. Thanks for your email.
@FunAndCreativeCorner
@FunAndCreativeCorner 2 жыл бұрын
@@interviewhappy thank you sir 🙏
@poojaswain4722
@poojaswain4722 2 жыл бұрын
Sir practical kar k dikha dete to or bhi achha hota
@interviewhappy
@interviewhappy 2 жыл бұрын
Noted Pooja.. next time
@poojaswain4722
@poojaswain4722 2 жыл бұрын
Thank you sir
@poojaswain4722
@poojaswain4722 2 жыл бұрын
Sir normalization ka ek video bana dijiye interview me bahut baar puchh chhuke hai
@interviewhappy
@interviewhappy 2 жыл бұрын
@@poojaswain4722 sure this is related with the design of tables in database. Right now I am creating something in Angular but will cover this soon.
@poojaswain4722
@poojaswain4722 2 жыл бұрын
Okk sir
@anzilkk8427
@anzilkk8427 7 ай бұрын
♥️👍
SOLID  Principal - Interview Questions and Answers
24:04
Interview Happy
Рет қаралды 128 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
The 25 SQL Questions You MUST Know for Data Analyst Interviews
32:47
KSR Datavizon
Рет қаралды 251 М.
Top 50 OOPS C# Interview Questions - .NET
3:05:33
Interview Happy
Рет қаралды 158 М.
Top 20 Interview Questions - Web API - .NET C#
42:22
Interview Happy
Рет қаралды 237 М.
Top 100  C#/ .NET/ Web API/ SQL Interview Questions
2:49:20
Interview Happy
Рет қаралды 589 М.
Learn SQL In 60 Minutes
56:24
Web Dev Simplified
Рет қаралды 2,2 МЛН
Top 30 .NET Core Interview Questions  in Hindi
1:24:48
Happy Rawat
Рет қаралды 65 М.
Вся база SQL для начинающих за 1 час
1:19:48
Vlad Mishustin
Рет қаралды 352 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН