This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
How Will You Deploy An Ssis Package In Testing, Staging & Production Environments? |
|
Answer» The dtutil is the command prompt utility which is USED to MANAGE SSIS packages. The dtutil is the command prompt utility which is used to manage SSIS packages. |
|
| 2. |
How Many Data Sources Are Available In Ssis? |
Answer»
|
|
| 3. |
What Are Pages In Sql Server? How Many Types Of Pages Are There? |
|
Answer» A page in SQL Server is an 8 KB data storage AREA.
A page in SQL Server is an 8 KB data storage area. |
|
| 4. |
How Many Types Of Internal Joins Are There In Sql Server? |
| Answer» | |
| 5. |
What Are Row Constructors? |
|
Answer» NEW WAY to insert MULTIPLE records in a table with INSERT statement. ALSO known as Table Value Constructor. New way to insert multiple records in a table with INSERT statement. Also known as Table Value Constructor. |
|
| 6. |
What Are The Required/mandatory Parameters That Have To Be Passed With Raiseerror Statement? |
| Answer» | |
| 7. |
How Many Types Of Temporary Tables Are There In Sql Server? |
| Answer» | |
| 9. |
What Are The Steps Involved In Database Partitioning? |
|
Answer» This involves 4 steps:
This involves 4 steps: |
|
| 11. |
What Are The Various Ssis Logging Mechanisms? |
| Answer» | |
| 12. |
How Will You Know Index Usage On Tables? |
| Answer» | |
| 13. |
What Is The Highest, Lowest & Default Isolation Level? |
|
Answer» Highest: SERIALIZABLE Highest: SERIALIZABLE |
|
| 14. |
What Are Acid Properties, Define Them? |
|
Answer» A – Atomicity (Transaction is atomic, if ONE part fails, then the entire transaction fails). A – Atomicity (Transaction is atomic, if one part fails, then the entire transaction fails). |
|
| 15. |
How Will You Rename A Table? |
|
Answer» By USING sp_rename STORED PROCEDURE. By using sp_rename stored procedure. |
|
| 16. |
What Is The Sequence For Logical Query Processing, What Is The Order? |
|
Answer» FROM, [JOIN CONDITION, JOIN TABLE ...], ON, OUTER, WHERE, GROUP BY, CUBE/ROLLUP/GROUPING SETS, HAVING, SELECT, DISTINCT, ORDER BY, TOP. FROM, [JOIN CONDITION, JOIN TABLE ...], ON, OUTER, WHERE, GROUP BY, CUBE/ROLLUP/GROUPING SETS, HAVING, SELECT, DISTINCT, ORDER BY, TOP. |
|
| 17. |
What Are Integrity Constraints? |
|
Answer» Integrity constraints are used to ensure ACCURACY and consistency of data in a relational database. Data integrity allows to define certain data quality requirements that the data in the database needs to meet. If a user tries to insert data that doesn’t meet these requirements, the RDBMS will not allow so. Integrity constraints are used to ensure accuracy and consistency of data in a relational database. Data integrity allows to define certain data quality requirements that the data in the database needs to meet. If a user tries to insert data that doesn’t meet these requirements, the RDBMS will not allow so. |
|
| 18. |
What Can You Do With Colasce Function? |
|
Answer» Returns the FIRST nonnull expression AMONG its arguments. Returns the first nonnull expression among its arguments. |
|
| 19. |
Types Of Replication? |
|
Answer» MICROSOFT SQL Server 2005 provides the following types of REPLICATION for USE in distributed applications:
Microsoft SQL Server 2005 provides the following types of replication for use in distributed applications: |
|
| 20. |
Difference Between Varchar & Varchar2? |
|
Answer» VARCHAR2 is specific to Oracle. MS SQL SERVER has VARCHAR & VARCHAR(MAX) data TYPES. VARCHAR2 is specific to Oracle. MS SQL Server has VARCHAR & VARCHAR(MAX) data types. |
|
| 21. |
What All Indexes Can You Have In A Table? |
|
Answer» ONE CLUSTERED INDEX, one or more than one non-clustered index, unique index, FILTERED, SPATIAL, xml, etc. One Clustered Index, one or more than one non-clustered index, unique index, filtered, spatial, xml, etc. |
|
| 22. |
How Many Non-clustered Indexes Can You Have In A Table? |
|
Answer» UPTO 249 non-clustered INDEXES can be CREATED in a table. Upto 249 non-clustered indexes can be created in a table. |
|
| 23. |
How Would You Know That If A Cursor Is Open Or Closed? |
|
Answer» Answer : declare @mycursor cursor declare @FirstName VARCHAR(12) SELECT CURSOR_STATUS('variable','@mycursor') --// -2 (Not applicable) SET @mycursor = cursor for select FirstName from Person.Contact select CURSOR_STATUS('variable','@mycursor') --// -1 (The cursor is closed) open @mycursor select CURSOR_STATUS('variable','@mycursor') --// 1 (The result set of the cursor has at least one row) fetch next from @mycursor into @FirstName select CURSOR_STATUS('variable','@mycursor') --// 1 (The result set of the cursor has at least one row) close @mycursor select CURSOR_STATUS('variable','@mycursor') --// -1 (The cursor is closed) deallocate @mycursor select CURSOR_STATUS('variable','@mycursor') --// -2 (Not applicable) select CURSOR_STATUS('variable','@nocursor') --// -3 (A cursor with the specified NAME does not exist) |
|
| 24. |
What Are The Various Isolation Levels? |
Answer»
|
|
| 25. |
What Is The Scope Of A Temporary Table? |
|
Answer» SCOPE is LIMITED to its SESSION only. Scope is limited to its session only. |
|
| 26. |
What Is A Table Called That Has ## Before Its Name, What Is Its Scope? |
|
Answer» Table with ## (DOUBLE pound signs) is CALLED Global TEMP table. Scope is outside the session but only TILL the original session lasts. Table with ## (double pound signs) is called Global Temp table. Scope is outside the session but only till the original session lasts. |
|
| 27. |
How Can You Copy Schema From One Sql Server To Another? |
| Answer» | |
| 28. |
How Can You Load Large Data In Sql Server? |
|
Answer» BulkCopy is a tool used to copy huge AMOUNT of data from tables. BULK INSERT command HELPS to IMPORTS a data file into a database table or VIEW in a user-specified format. BulkCopy is a tool used to copy huge amount of data from tables. BULK INSERT command helps to Imports a data file into a database table or view in a user-specified format. |
|
| 29. |
Can Stored-procedures Be Recursive? And Upto How Much Level? |
|
Answer» Yes, 32 levels. |
|
| 30. |
What Are The Virtual Tables In Triggers? |
|
Answer» The VIRTUAL TABLES in TRIGGERS are: The virtual tables in Triggers are: |
|
| 31. |
How Will You Handle Exceptions In Sql Server Programming? |
|
Answer» By using TRY-CATCH constructs, putting our SQL statements/scripts inside the TRY BLOCK and error HANDLING in the CATCH block. By using TRY-CATCH constructs, putting our SQL statements/scripts inside the TRY block and error handling in the CATCH block. |
|
| 32. |
How Many Types Of Functions (udf) Are There In Sql Server? |
|
Answer» SQL SERVER supports MAINLY 3 types of UDFs: SQL Server supports mainly 3 types of UDFs: |
|
| 34. |
What Are Cube & Rollup Sets? |
|
Answer» CUBE & ROLLUP are the grouping sets USED with GROUP BY CLAUSE and are very helpful in creating REPORTS. CUBE & ROLLUP are the grouping sets used with GROUP BY clause and are very helpful in creating reports. |
|
| 35. |
What Should Be The Ideal Combination With In & Union (all) In Terms Of Performance? |
|
Answer» ANSWER : SELECT *FROM WHERE IN (SELECT… UNION SELECT…) OR SELECT * FROM WHERE IN (SELECT… UNION ALL SELECT…). |
|
| 36. |
Difference Between Coalesce() & Isnull()? |
Answer»
|
|
| 37. |
What Are The Multiple Ways To Execute A Dynamic Query? |
|
Answer» EXEC sp_executesql, EXECUTE() EXEC sp_executesql, EXECUTE() |
|
| 38. |
Why You Should Not Use A Cursor? What Are Its Alternatives? |
|
Answer» If possible, avoid using SQL Server CURSORS. They generally use a LOT of SQL Server resources and REDUCE the performance and scalability of your applications. If you NEED to perform row-by-row operations, try to find another METHOD to perform the task. Here are some alternatives to using a cursor:
If possible, avoid using SQL Server cursors. They generally use a lot of SQL Server resources and reduce the performance and scalability of your applications. If you need to perform row-by-row operations, try to find another method to perform the task. Here are some alternatives to using a cursor: |
|
| 39. |
How Can You Execute A Dos Command From Sql Or Through Sql Query By Using Xp_cmdshell? |
|
Answer» exec xp_cmdshell 'dir c:*.exe' exec xp_cmdshell 'dir c:*.exe' |
|
| 40. |
Difference Between Delete & Truncate Statement? Which Statement Can Be Rollbacked? |
Answer»
|
|
| 41. |
How Can You Execute An Sql Query From Command Prompt? |
|
Answer» By using OSQL & SQLCMD we can execute an SQL QUERY from command prompt. By using OSQL & SQLCMD we can execute an sql query from command prompt. |
|
| 42. |
What Tools Do You Use For Performance Tuning? |
|
Answer» SQL SERVER 2000 includes several TOOLS you may find useful when PERFORMANCE tuning your SQL Server applications. The include: SQL Server 2000 includes several tools you may find useful when performance tuning your SQL Server applications. The include: |
|
| 43. |
Difference Between Sql Server 2000 & Sql Server 2005 Features Or New Features Of 2005 Vs 2000? |
Answer»
|
|
| 44. |
How To Create Temporary Table? How Do We Apply Noncluster Index? What Is Nolock? When And Where Is Nolock Applied Normally? |
|
Answer» Two ways of creating temporary table with non clusterindex applied on it. Also example shows how to apply "nolock". nolock is NORMALLY applied while querying on production servers. This would MAKE the records being queried sharable on the table. ie, will not prevent other queries from querying the same record parallely on same table. The RISK will be nolock might return junk data some times because the select query might be querying the table while some other insertion or updation commands are performed on the table. CREATE TABLE #tmpTable ( OfficeName varchar(50) , officeid int , CustID int , AgentID int , mlsid varchar(4) , RequestMoreDetails int null , Emails int null ) CREATE NONCLUSTERED INDEX #IX_DW_Listings ON #DW_AllListings(AgentID) select OfficeName , officeid , o.CustID , AgentID - , o.mlsid , PrintBrochure_Views = null , RequestMoreDetails = null , Emails = null into #ForOffices from #Offices LEFT JOIN dbo.planparts WITH (NOLOCK) ON bppa.officeid = o.RID CREATE NONCLUSTERED INDEX #IX_DW_Listings ON #ForOffices(AgentID)Two ways of creating temporary table with non clusterindex applied on it. Also example shows how to apply "nolock". nolock is normally applied while querying on production servers. This would make the records being queried sharable on the table. ie, will not prevent other queries from querying the same record parallely on same table. The risk will be nolock might return junk data some times because the select query might be querying the table while some other insertion or updation commands are performed on the table. |
|
| 45. |
How To Update 'yes' To 'no' And Viceversa In A Query? |
|
Answer» UPDATE TABLENAME set ColumnName1 = (case ColumnName1 when 'Yes' then 'No' ELSE 'Yes' end). Update tablename set ColumnName1 = (case ColumnName1 when 'Yes' then 'No' else 'Yes' end). |
|
| 46. |
What Is Patindex? |
|
Answer» Returns the STARTING position of the first OCCURRENCE of a PATTERN in a SPECIFIED expression, or zeros if the pattern is not found. Returns the starting position of the first occurrence of a pattern in a specified expression, or zeros if the pattern is not found. |
|
| 47. |
How To Query A String Contains %? |
|
Answer» SELECT NAME FROM tblPlayer WHERE Name LIKE '%[''%'']'. SELECT Name FROM tblPlayer WHERE Name Like '%[''%'']'. |
|
| 48. |
How To Use Sql Query To Copy Only Structure? |
|
Answer» SELECT * into TABLE2 from TABLE1 where 1 = 2 select * into table2 from table1 where 1 = 2 |
|
| 49. |
What Is Tsql? |
|
Answer» TSQL (Transact-SQL) is a set of programming extensions from SYBASE and Microsoft that ADD several features to the Structured Query Language (SQL) including transaction control, exception and error handling, row processing, and declared variables. Microsoft's SQL Server and Sybase's SQL server SUPPORT T-SQL STATEMENTS. TSQL (Transact-SQL) is a set of programming extensions from Sybase and Microsoft that add several features to the Structured Query Language (SQL) including transaction control, exception and error handling, row processing, and declared variables. Microsoft's SQL Server and Sybase's SQL server support T-SQL statements. |
|