Top SQL Tricky Interview Questions | sql server realtime scenario | SQL Server

preview_player
Показать описание
SQL Server Realtime scenarios

For SQL Quiz-

Find Us On FaceBook-

-------------------------------------------------------------------------------------
Query
--------------------------------------------------------------------------------------

Create Table UserTemp
(
Id Int,
Name Varchar(100),
OrgName Varchar(50)

)
Create Table Error_Log
(
Id Int,
Name Varchar(100),
OrgName Varchar(50),
Error_Desc Varchar(1000)

)
Insert Into UserTemp values (1,'John Smith','SS Unitech'),(2,'Joanne Sawyer','SS Unitech'),
(3,'Howard Fite','Temp'),(4,'Vic','Temp'),(5,'Sam','Test')

Delete UT
OUTPUT deleted.Id,deleted.Name,deleted.OrgName,'Incorrect OrgName! Please correct and then proceed.' Into Error_Log
From UserTemp as UT
Where OrgName!='SS Unitech'

drop table Error_Log
drop table UserTemp
Рекомендации по теме
Комментарии
Автор

Great Sir you always comes with new things.🙏

djshaikhofficial
Автор

Explained very well... Doing practice watching same video..

jyotikothari
Автор

Thanks for thia video.
Your videos are awesome as always.

amritasingh
Автор

Your sql series of interview questions are so so helpful.. Thank you so much for sharing..

chetalikekre
Автор

Thank you Sushil sir for reading my comments and replying. Since long time I was stopped studying that's why I was not watching your video but now started

KumarCode
Автор

Hi sir
Good morning
Can please provide db script for
To delete records from hole databse if more than 2 months .can u please suggest how to write this script

tejeshkadiri