Featured

32.SQL Interview Questions and Answers for Data engineer,Data Analyst,Database Developer,Datascience



Published
Download App to Learn SQL & Python: https://play.google.com/store/apps/details?id=com.studyit.learners
-------------Join my Real-time Job Oriented Courses --------------------
Website: https://www.studyiteducation.com/
Download Complete SQL Training Materials: http://bitly.ws/torp
Download SQL Interview Questions with Answers: http://bitly.ws/torx
Download SQL Training Videos, Notes,& Interview Questions:https://bit.ly/3pjcRPX
Practice Real-time SQL Interview Questions: https://bit.ly/3C6FQhF
One-to-One Live Training with Interview Preparation: https://bit.ly/3QryIR0
---------Connect on Social Media----------------------------------------------
Facebook: https://www.facebook.com/mpandeyguruji/
Instagram: https://www.instagram.com/pandey_guruji/
Linkedin: https://www.linkedin.com/in/mukesh-pandey-1a151634/
Telegram: https://t.me/pandeyguruji
----------------Top Playlist------------------------------------------------------------------
SQL Tutorial for Beginners in Hindi: https://bit.ly/3CwfnGB
SQL Tutorial for Beginners in English: https://bit.ly/3qVI3GQ
SQL Practice Exercises with Solutions: https://bit.ly/3Eb5tNg
SQL Interview Questions: http://bit.ly/2CR6wCZ
Advanced SQL Interview Questions: https://bit.ly/3HnMrnN
Crack SQL Interview: https://bit.ly/3caxIyb
SQL Live Training: https://bit.ly/3kXqOl1
Career Guidance: https://bit.ly/3FffkRf
IT Technology News & Updates: https://bit.ly/3FeNQvc
---------------------------------------------------------------------------------------------------
In this video discussed below SQL Interview Questions
--1. what is difference between union and full outer join.

/*

Joins combine data into new columns— If two tables are joined together, then the data from the
first table is shown in one set of column alongside the second table’s column in the same row.
The FULL OUTER JOIN keyword returns all records when there is a match in either left (table1)
or right (table2) table records. FULL OUTER JOIN can potentially return very large result-sets

SELECT column_name(s)
FROM table1
FULL OUTER JOIN table2 ON table1.column_name = table2.column_name;*/

Select ed.EmpID, ed.EmpName,e.EmpID,e.EmpName,e.Empsalary
from EmployeeDetails ed
left Join EmpSalary e on e.EmpID = ed.EmpID

/*-----------------------------------------------------------------
Unions combine data into new rows— If two tables are “unioned” together, then the data from the
first table is in one set of rows, and the data from the second table in another set. The rows are
in the same result.
The UNION operator is used to combine the result-set of two or more SELECT statements.
Each SELECT statement within UNION must have the same number of columns
The columns must also have similar data types
The columns in each SELECT statement must also be in the same order

SELECT column_name(s) FROM table1
UNION
SELECT column_name(s) FROM table2;
*/

Select courseID,CourseName from courses_a
Union
Select courseID,CourseName from courses_b


Select CourseName from courses_a
Union
Select courseID,CourseName from courses_b


--2. How to reseed the identity column in an SQL server?

DBCC CHECKIDENT ('TableName', RESEED, 1)


--3. Can we use dynamic SQL in function?

--You can't execute dynamic SQL in user-defined functions.

--4 What is physical and Logical Joins.

/*
Physical joins are the ones, which will be used by sql Server internally. You will not write queries
with them unless you explicitly specify with Hints.

Logical joins: Inner join, Outer join, Full join, Cross join, Apply operators
Physical Joins: Merge join, Hash join

*/

--5. What is Column Store Indexes

/*
SQL Server 2012 introduced a new feature Column store indexes that can be used to improve query performance.
Column storage is the ability to read the values of a specific column of a table without having to read the values of all the other columns.
*/
---------------------------------------------------------------------------------------------------
Disclaimer - This video is just for educational purposes.
Copyright Disclaimer under Section 107 of the Copyright Act 1976, allowance for the "fair use".
All the images, music, and graphics used in this video belong to their respective owners and I or this channel do not claim any right over them.
Copyright Disclaimer under section 107 of the Copyright Act 1976, allowance is made for “fair use” for purposes such as criticism, comment, news reporting, teaching, scholarship, education, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing
Category
Job
Be the first to comment