SQL Server and Sybase ASE Database Concepts

Covers triggers, stored procedures, transactions, joins, subqueries, and SQL Server administration topics

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the below commands is used to find more information about the SQL Server installed such as edition, product level etc. ?

  1. Select * from sys.servers
  2. sp_get_serverinfo
  3. select @@version
  4. sp_serverproperty
Question 2 Multiple Choice (Single Answer)

What is ACID property?

  1. Atomicity,Concurrently,Isolation,Durability
  2. Atomicity,Consistency,Incremental,Durability
  3. Atomicity,Consistency,Isolation and Durability
  4. Atomicity,Concurrently,Incremental,Durability
Question 3 True/False

Identity is a column that automatically generates numeric values.

  1. True
  2. False
Question 4 Multiple Choice (Multiple Answers)

Which of the following are different locks in SQL SERVER?

  1. Intent
  2. Shared
  3. Exclusive
  4. Delete
Question 5 Multiple Choice (Multiple Answers)

Which of the following are different Isolation levels in SQL Server?

  1. Read Uncommitted
  2. Read Committed
  3. Serializable
  4. Repeatable Read
Question 6 True/False

Linked Servers cannot be created to SQL and Non-SQL data sources such as Oracle, MySQL, Sybase etc.

  1. True
  2. False
Question 7 Multiple Choice (Single Answer)

Which of the following is a SQL Server 2005 Build number?

  1. 10.5.1702
  2. 8.00.223
  3. 9.00.4285
  4. 7.00.1152
Question 8 Multiple Choice (Multiple Answers)

Which of the following statements about subqueries are true? (Choose 3)

  1. Subqueries can have up to 16 levels of nesting
  2. Subqueries can have up to 50 levels of nesting
  3. Subqueries returning only one row can follow “=” in a WHERE clause
  4. Subqueries returning only one row can follow “IN” in a WHERE clause
Question 9 Multiple Choice (Single Answer)

For which of the following queries may a merge join be considered?

  1. Outer joins
  2. Multi-table updates and deletes
  3. Equi-joins
  4. Equi-join with a text column in select list
Question 10 Multiple Choice (Multiple Answers)

A UNION of two or more queries is valid provided the queries meet which of the following conditions? (Choose 3)

  1. All select lists in the UNION must have the same number of expressions
  2. Corresponding columns must have the same column names
  3. Corresponding columns must be of the same datatype or the server must be able to implicitly convert them
  4. Corresponding columns must be in the same order
Question 11 Multiple Choice (Multiple Answers)

Choose the correct statements about the union clause in ASE (Choose 2)

  1. Duplicate rows are removed from the result set by default
  2. ASE evaluates a statement containing union operators from left to right
  3. Order by and group by clauses are not allowed in a union query
  4. The into clause can be used only in the first query
Question 12 Multiple Choice (Multiple Answers)

Which of the following are true about triggers? (Choose 2)

  1. the inserted and deleted tables are created manually
  2. triggers can be disabled using alter table
  3. a single trigger can be created for both insert and delete
  4. @@sqlstatus contains the number of rows affected
Question 13 Multiple Choice (Single Answer)

Table t and trigger trig are created as follows: create table t (a int) go create trigger trig on t for insert, update, delete as begin if @@rowcount > 1 rollback trigger end go The following transaction is now executed: begin tran insert t values (1) insert t values (2) insert t select * from t insert t values (3) commit go After completing this transaction, how many rows will table t contain?

  1. 0
  2. 1
  3. 2
  4. 3
Question 14 Multiple Choice (Multiple Answers)

Which T-SQL elements can be used in a stored procedure? (Choose 2)

  1. 'return', without a return value
  2. 'rollback transaction'
  3. 'rollback trigger'
  4. the built-in function 'update()'
Question 15 Multiple Choice (Single Answer)

Which ASE table contains the source code of a stored procedure?

  1. sysprocedures
  2. syscomments
  3. syslogs
  4. systext
Question 16 Multiple Choice (Single Answer)

What is the maximum number of characters that can be passed to a stored procedure through a single char or varchar parameter without being truncated?

  1. 127
  2. 255
  3. 16384
  4. equal to the server page size
Question 17 Multiple Choice (Single Answer)

The following trigger exists: create trigger trig on t for insert, update, delete as begin print 'This is 'trig' ' end The following command is now executed: create trigger trig on t for insert as begin print 'This is 'trig' ' end After executing this command, for which DML actions on table 't' will a trigger be fired?

  1. insert
  2. update
  3. insert, update, delete
  4. delete,update
Question 18 Multiple Choice (Multiple Answers)

Creation of which DB objects will cause a DDL trigger to fire?

  1. Index
  2. Cluster
  3. Package
  4. DB links
  5. Function
Question 19 Multiple Choice (Single Answer)

A call statement inside the trigger body enables you to call:

  1. Package
  2. Function
  3. Procedure
  4. Another DB trigger
Question 20 Multiple Choice (Single Answer)

What part of a DB trigger determines the number of times a trigger body executes?

  1. Trigger type
  2. Trigger body
  3. Trigger event
  4. Trigger timing