SQL interview Questions for Fresher and Experienced developer
Here are detailed answers with explanations and examples for each SQL interview topic, especially suited for experienced candidates: 1. Table Type in SQL A Table Type is a user-defined data type in SQL Server that can store a result set for later use in functions, procedures, or batch execution. CREATE TYPE EmployeeType AS TABLE (EmpID INT, EmpName NVARCHAR(50)); 2. Non-Clustered Index A Non-Clustered Index maintains a separate structure with a pointer to the actual data. Unlike a clustered index, it doesn't rearrange the data. CREATE NONCLUSTERED INDEX idx_empname ON Employees(EmpName); 3. Temp Table Temporary tables store intermediate data temporarily for further processing. They exist only during the session. CREATE TABLE #TempTable (ID INT, Name NVARCHAR(50)); 4. EDMX for Oracle DB Yes, EDMX can be generated for Oracle using Entity Framework via third-party providers like Devart dotConnect for Oracle. 5. Difference Between Primary and Unique Key Primary Key: Cannot contain NULL...