SQL Interview Questions -Set3 – User friendly Tech help
Lets explore more on SQL interview questions.
n
nKeep sharing and Keep learning.
n
Do follow us for more updates on Fb,G+,Twitter.
n
- n
- Why we use Triggers in SQL? Explain with real time example.
- Can we use pre triggers in SQL?
- We have Table A AS 10 MB space and Table B as 10 MB space, what would be the size of View created by joining both the tables.
- How to improve performance in SQL query execution.
- Is view called a physical object?
- How many rows would be shown in the result for query Select * from Table A , Table B.
nWhere Table A have 10 rows and Table B have 20 rows - Column Bool in Table A, have values 1,0,1,1,0,1,0,1 write a query to replace all 0 with 5 and all ‘1’ with 10n
Hint:-Update Table A SET Bool = CASE when Bool > 0 THEN 10 ELSE 5 END
n
- Table A , have column named First_Name, write a query to concatenate “LongName” at the end incase name is more than 10 alphabets long.
nHint:-select len(FIRST_NAME) from employee - Advantages of using SP(Stored procedures)?
nHint:-Stored procedure can reduced network traffic and latency, boosting application performance.Stored procedure execution plans can be reused, staying cached in SQL Server’s memory, reducing server overhead.Stored procedures help promote code reuse.Stored procedures can encapsulate logic. You can change stored procedure code without affecting clients.nStored procedures provide better security to your data.
n
- What is a cursor and why would you use it?
- How do you auto number rows in SQL Server?
nUsing Identity Column
n
n
n
n
n
n
n
n
n
n
n