Thank you for your reply Bret. :-)
I have almost 30 questions unanswered or half answered.
I hope I am not violating the rules of this discussion group by posting all questions in one discussion.
Thank you
Identify the error in the following query? (Choose 2)
Select col1, col2, col3 from TableA, TableB, TableC
Where TableA.col1 = TableB.col1 group by col3
- There is no order by clause
- There is no join clause for table C.
- There are no aliases
- Identically named columns in two separate tables are not permitted
- “col1” is ambiguously named but
Choose the steps followed by optimization to analyze a query (choose 3)
- the final access method is determined
- Each table is analyzed
- Adds optimized search arguments and join clauses
- the cost of using each index that matches a search a argument or join columns
- The query is prased and normalized
Which of the following system tables contain optimizer statistics? (select one or more)
- Systabstats
- Sysobjects
- Sysindexes
- Syscolumns
- Sysstatistics
Which of the following statements are true regarding a sort merge join? (Choose 3)
- Full merge join requires sorts of the table involved.
- Merge joins are only selected for equi joins.
- Nested loop joins are always considered.
- The sort merge facility is enabled by default.
- To be considered, the sort merge option must be enabled.
Which of the following are valid parallel data access methods? (Choose 4)
- Hash based clustered indexes scan.
- Partition based table scan.
- Partition based non clustered scan.
- Partition based clustered index scan.
- Hash based non clustered index scan.
- Hash based table scan.
- A composite non clustered index on au_lname, au_fname, au_id is created. Which of the following will be the fastest of all?
- Select au_id from authors WHERE au_fname = “Eliot” and au_lname = “Wilk”
- Select au_id, from authors WHERE au_fname = “Eliot” and au_lname = “Wilk”
- Select au_fname, au_lname from authors WHERE au_id = “A1714224678”
- Select au_fname, au_lname, phone from authors WHERE au_id = “A1714224678”
Which are the following are true about rules? (Choose 2)
- Rules cannot be used with char, varchar, text or image datatypes.
- Rules bound to columns take precedence over rules bound to data types.
- Column default values need not fall within the domain defined be a rule.
- Rules can be used to enforce referential integrity.
- One of the table will be dropped when the user logs off
Which of the following is false about the union operator? (choose 2)
- Select into clause cannot be used along with union.
- Parenthesis can be used to specify the order of evaluation of the union operator
- You can use any number of union operators in a sql statement
- You can have group by and having clause for individual statements and not on the either result set.
Which of the following global variables are sessions? Specify? (Choose 2)
- @@Version
- @@Servername
- @@thres_hysteresis
- @@Translate
- @@error
Isolation level 3 enforces____________.
- Exclusive lock
- Holdlock
- Lock contention
- Deadlock
Sharable temporary tables are (Choose 2)
- Tables created in tembdb using tempdb.. command and have to be explicitly dropped.
- A temporary table that are created just before their use in the procedure and which exist till the procedure executes.
- #table created in main procedure and used in the sub procedures.
- Tables that can be accessed by the current sever session or procedure.
Which of the following statements are true about isolation level(Choose 3)
- The at isolation clause is valid within a subquery
- The at isolation clause is valid with a query using the into clause
- The at isolation clause is invalid with a query using the for browse clause
- The at isolation clause is invalid with a query in the insert statement
- The at isolation clause is valid with a query in the create view statement
- The at isolation clause is valid only for single select and readtext queries or in the declare cursor statement
Which of the following is not true about this query?
Select * from sales_order
Where order_amt/12 > 15000
And salesman = ?Pablo?
- The query optimizer will consider performing a table scan.
- The query optimizer will consider using the index on salesman
- The query optimizer will consider using the index on order_amt
- The query optimizer will choose an access method based on cost
Which of the following statements about optimizer statistics are true? (Choose 3)
- By default, dropping then recreating an index on a table with data overwrites any statistics on its leading column.
- By default creating an index on an empty table generates statistics on its leading column
- Dropping an index does not delete any column statistics
- By default creating an index on a table with data generates statistics on its leading column.
For a reference key constraint, which of the following is false? (Select 2)
- We can define references to another table.
- We can create references from another table.
- We can create references within the same table.
- We can reference a non-unique column in the referenced table.
- We can have a list of one or more column names in the foreign key constraints.
Given the following syntax ,which of the following statements are true?(choose 3)
“Select name, location into #tableB from a.tableA
Where id = 27”
- Multiple databases are involved
- Both tables exit prior to running the statements
- The tables have the same columns
- Multiple rows can be effected
The optimizer considers the size of the table in determining which aspects of a query
Plan? (Choose 3)
- Serial Scan versus Parallel Scan
- Inner table versus Outer Table
- Index selection versus table scan
- Partition based versus hash based scan
Which among the following is FALSE about the ‘group by all’ clause? (Choose 2)
- Group by all clause ignores the where clause in calculating the aggregate values of the group.
- Group by all clause considers the where clause in calculating the aggregate values of the group.
- Group by all clause even displays groups that don’t satisfy the where condition.
- Group by all clause displays only the group satisfying the where condition.
- Group by all clause can have NULL values in the aggregate function column.
Given the following query:
Select T.title, P.pub_name from titles T, Publishers P
Where T.price > $10.00 and T.pub_id = P.pub_id abd P.pub_state = ?NY?
Which of the following indexes will the ASE optimizer consider using? (Choose 3)
- Create unique clustered index idx4 on publishers (pub_id)
- Create clustered index idx5 on publishers (pub_name)
- Create index idx1 on titles (price)
- Create unique index idx3 on titles (title_id)
- Create index idx2 on titles (pub_id)
Create table T1
(Col1 int NULL)
There is an insert trigger on the table T1. What will happen if we fire the following statement?
Insert into T1 values (“abc”)
- Adaptive server will give an error and the trigger will not fire.
- “abc” will not be inserted but the trigger will be fired without giving any error.
- “abc” will not be inserted and trigger will not be fired without giving any error.
- Adaptive server will give and error but the trigger will be fired.
How many times will the loop execute?
Declare @ int
While @ < 100
Begin @ = @ + 1
Print “Hi”
End
- 0
- The loop is endless
- 100
- None of the listed options
- Will give error on execution
- Raiserror 70500 “table %1! Not found”, @mytablegiven the above raiserror statement,which of the following are true(2)
- The text message is returned to the user and is not reusable
- The number 70500 is stored in @@error global variable
- The text message is stored in sysusermessages table
- The statement is syntactically incorrect
The maximum number of tables allowed in a query are_______ .
- 16 tables in from clause excluding base table in subqueries and tables in into clause.
- 16 tables are views including base tables of views, tables in subqueries and tables in into clause.
- 16 tables in the from clause and including base tables of views.
- Any number of tables can be referred in a query.
Default adaptive server creates a _____.
- Clustered unique index.
- Non clustered non unique index.
- Non clustered unique index.
- Clustered non unique index.
The following statement has been executed.
Create table t (a int, b int, check (a > b))
It is then decided that the check constraint should be changed to ‘(a>b)’
Which commands and/ or stored procedure must be executed, and in which order, to accomplish this change?
- Sp_help; alter table; alter table
- Sp_help; alter table
- alter table; alter table
- alter table
- sp_helpconstraint; alter table
- sp_helpconstraint; alter table; alter table
Text of abstract plan for a query plan is stored in which of the following system tables?
- Systabstats
- Sysobjects
- Sysstatistics
- Syscomments
- Sysquerypalns
Which of the following is not true for views? (select one)
- when we create a view using the with check option clause, each insert and update *** against the views selection criteria
- If we can change the name of the views underlining object, the view will still work on the ***
- if we define a view with select * clause and then alter the structure of it underlying table the new columns will appear
- We can change the definition of an intermediate view without affecting dependent views *** of the dependent view remain valid
Given the following:
(Table student already created and populated having columns name as varchar (50) and id as int and having data abc, 1 and xyz, 2)
Begin
Declare @a char,
@b int
Select “Hi” + name + @a,
Id + @b
From student
End
Which will be output of the statements?
- Hi abc, 1 and Hi xyz, 2
- NULL, 1 and NULL, 2
- NULL, NULL and NULL, NULL
- Hi abc, NULL, HI xyz, NULL
Following statements are given in a batch?
Select * from t1
Select * from t2
Select * from t3
Select * from t4
If the user dos not have the permission on table t2 then what will be the output of the batch?
- Data will be retrieved from all 4 tables.
- All 4 statements will not be executed and error message will be generated.
Which of the following inserts will give error in insertion for violating the
rule/ constraint? (Choose 2)
Given
Create table t1 (a int NOT NULL, b int DEFAULT 10 NULL)
Go
Create Rule B_Rule as @Bval between 0 and 100
Go sp_bindrule B_Rule, “t1.b”
Go
Alter table t1
Add constraint B_check
Check (B Between -10 and 10)
Go
- Insert into t1 values(4, 10)
- Insert into t1 values(4, -10)
- Insert into t1 values(4, 0)
- Insert into t1 values(4, 99)
- Insert into t1 values(4, NULL)
Which T-SQL statements are NOT considered for parallel processing?
- Select statement that include a UNION
- Update
- Readtext
- Merge Join