News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Online Test MS SQL Server 2005

  1. With DDL, you can create and remove tables, schemas, domains, indexes and views.

  2. SELECT, INSERT and UPDATE are DCL commands.

  3. GRANT and REVOKE are DML commands.

  4. COMMIT and ROLLBACK are DCL commands.

Answer: Answer is a

  1. Restriction

  2. Extraction

  3. Projection

  4. Intersection

  5. Union

Answer: Answer is b
Further Reading:

Useful resources, Relational Set Operators


enggid                int(4)
name                varchar(50)
salary                int(4)

You want to select the top 2 engineers in the decreasing order of their salaries, starting with the maximum salary. Which of the following SQL queries will fetch this data?

  1. SELECT TOP 2 * FROM engineers ORDER BY max(salary) DESC

  2. SELECT TOP 2 * FROM engineers ORDER BY salary DESC, GROUP BY salary

  3. SELECT TOP 2 * FROM engineers GROUP BY salary DESC

  4. SELECT TOP 2 * FROM engineers ORDER BY salary DESC

  5. SELECT TOP 2 [name], salary FROM engineers ORDER BY salary DESC

Answer: Answer is d, e

  1. Truncate is faster than Delete

  2. Truncate is a DDL command

  3. Truncate retains the identity of the table

  4. Truncate cannot be rolled back

  5. Truncate removes all rows from the table

Answer: Answer is c
Further Reading:

Useful resources, DDL Statements, Truncate Table


select * from Orders where OrderID = (select OrderID from OrderItems where ItemQty > 50)

  1. In the sub query, '*' should be used instead of 'OrderID'

  2. The sub query can return more than one row, so, '=' should be replaced with 'in'

  3. The sub query should not be in parenthesis

  4. None of the above

Answer: Answer is b

  1. You can create DDL triggers

  2. You can create DML triggers

  3. Both a and b are correct

  4. Neither a nor b is correct

Answer: Answer is c
Further Reading:

Useful resources, DML Triggers


Triggers can be created in Assemblies.

  1. True

  2. False

Answer: Answer is a
Further Reading:

Useful resources, Create CLR Triggers


  1. Errors and deadlocks can be handled by using stored procedures

  2.  Errors and deadlocks can be handled by using cursors

  3. Errors and deadlocks can be handled by using Try and Catch constructs

  4. Errors and deadlocks can be handled by using inline queries

Answer: Answer is c
Further Reading:

Useful resources, Using TRY/CATCH to Resolve Deadlocks


  1. The Correlated sub-query scans the whole table

  2. Joins pick up the rows according to the condition of the queries

  3. The Correlated sub-query creates a nested loop

  4. The Correlated sub-query makes the statement complex

Answer: Answer is c
Further Reading:

Useful resources, Subquery, Correlated Subqueries


  1. Both Primary key and Unique key enforce uniqueness

  2. Primary keys create a clustered index by default

  3. Both Primary key and Unique key don't allow NULL values

  4. Unique keys create a non-clustered index by default

  5. It is possible to have more than one Primary key in a table

Answer: Answer is e
Further Reading:

Useful resources, PRIMARY KEY Constraints


Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;