SQL Interview Questions
SQL Interview Questions 1. Is semicolon used after sql? If yes/No, please justify the reason. The semicolon (;) is used in SQL code as a statement terminator. For most SQL Server T-SQL statements it is not mandatory 2.Difference between JOIN and UNION A JOIN is a means for combining fields from two tables by using values common to each. The SQL UNION operator combines the result of two or more SELECT statements. 3. Difference between order by and group by. Group by statement is used to group the rows that have the same value. Whereas Order by statement sort the result-set either in ascending or in descending order. 4. SELECT Person.Name, COUNT(Sales.SalesID) AS NumberOfSales FROM Sales INNER JOIN Person ON Sales.Person.ID=Person.PersonID WHERE Name="Ram" GROUP BY Name HAVINGCOUNT(Sales SalesID) >15; 5. Is SQL case sensitive SQL Server is, by default case insensitive; 6. What does drop function does. The DROP FUNCTION statement is used to drop a...