__________ is a container that holds tables, views, procedures, functions and so on.
Instance 0.0%
Cluster 0.0%
Metadata 0.0%
Schema 80.0%
None of the above 20.0%
A table of employees has the following values for its salary field: 10000, 11000, 12000, 10000, 14000, 12000, 13000, 10000, 14000, 10000 What will the following query return? Select distinct (sal...
10000, 14000, 12000, 10000, 11000 0.0%
10000, 11000, 12000, 10000, 14000, 12000 0.0%
10000, 11000, 14000, 12000, 13000, 10000 0.0%
10000, 11000, 12000, 13000, 10000, 14000 0.0%
10000, 11000, 12000, 14000, 13000 100.0%
Columns are called _____________ of a table in a relational model.
Tuples 0.0%
Elements 0.0%
Objects 0.0%
Attributes 100.0%
Constraints 0.0%
Consider the following query: Select name from employees where name like "%_n_" Which names will be displayed?
Names starting with n 0.0%
Names containing n 0.0%
Names containing n as the second letter 0.0%
Names containing n as the second last letter 100.0%
Names having 3 ns 0.0%
Consider the following table "Students": Students - - - - - - Name Hobbies John Driving Miller Fishing David Writing Robert ...
Dri 0.0%
ivi 0.0%
iving 22.0%
ving 0.0%
It will give an error 77.0%
Consider the following table structure of employees: empid int(4) deptname varchar(50) salary int(4) Which q...
select deptname from employees where salary =max(salary) 0.0%
select deptname from employees where salary =max(salary) group by deptname 0.0%
select deptname from employees where salary = (select salary from employees group by salary) 0.0%
select deptname from employees where salary =(select max(salary) from employees) 88.0%
select deptname from employees where salary in (select salary from employees group by salary) 11.0%
select deptname from employees where max(salary) in (select salary from employees group by salary) 0.0%
Consider the following table: Order - - - - - Orderid Customerid Orderdate Comments Select ISNULL (Comments, 'No comments') AS comments From Order What will be the output of the above query?
The output will always be "No comments" irrespective of the value in the Comments field 0.0%
The output will be null in all the rows 0.0%
The output will be "No comments", when the database entry is Null 100.0%
The output will be "No comments", when the database entry is Not Null 0.0%
This query is erroneous 0.0%
Consider the following tables: Customers - - - - - - - - Customerid Customername Address Orders - - - - - Orderid Customerid Orderdate Comments What will be the query to fetch Customername and 1s...
Select Customers.Customername,(Select Min(Orderdate) From Orders Where Customers.Customerid=Orders.Customerid) From Customers 100.0%
Select Customers.Customername,(Select Max(Orderdate) From Orders Where Customers.Customerid=Orders.Customerid) From Customers 0.0%
Select Customers.Customername,(Select Orderdate From Orders Where Customers.Customerid=Orders.Customerid) From Customers 0.0%
Select Customers.Customername,Min(Orders.Orderdate) From Orders,Customers Where Customers.Customerid=Orders.Customerid 0.0%
None of these 0.0%
Examine the data in the EMPLOYEES table given below: LAST_NAME DEPARTMENT_ID SALARY Allen 10 3000 Miller 20 1500 King 20 ...
SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department_id) 7.0%
SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id) 7.0%
SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id) 42.0%
SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id) 42.0%
SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY)) 0.0%
How is the following query incorrect? select * from Orders where OrderID = (select OrderID from OrderItems where ItemQty > 50)
In the sub-query, '*' should be used instead of 'OrderID' 0.0%
The sub-query can return more than one row, so, '=' should be replaced with 'in' 100.0%
The sub-query should not be in parenthesis 0.0%
None of the above 0.0%
SQL SERVER 2005 provides a new feature to enable partitioning of the data in the database. But only those database objects can be partitioned which store data in the database. In accordance with th...
Functions 16.0%
Triggers 0.0%
Table 41.0%
Indexes 41.0%
Assemblies 0.0%
Starting from the slowest, arrange the following operators in the order in which they produce results in "SQL WHERE" query. 1. >, >=, <, <= 2. <> 3. = 4. LIKE
1,4,3,2 0.0%
4,1,2,3 100.0%
3,2,1,4 0.0%
2,4,1,3 0.0%
State whether True or False. A User Defined Function 'findsum' is to be created as follows: Create function findsum(@x int, @y int) As Begin Return(@x+@y) End But the SQL SERVER is unable to crea...
State whether True or False. Many-to-One is a type of relationship in RDBMS.
State whether True or False. The 'Having' clause can not be used when there is a 'Where' clause in the statement already.
State whether True or False. The "text" and "ntext" data type can store character based data. These data types can be used in joins.
State whether True or False. The plus (+) and minus (-) operators cannot be used to perform increment/decrement operations on datetime and smalldatetime values.
State whether True or False. Triggers can be created in Assemblies.
State whether True or False. While using the Select query, the IN clause is a better choice than the EXIST clause.
State whether True or False. You can send emails through the Database engine.
The - (Negative) and ~(Bitwise NOT) are examples of the _________ type of operators.
logical 0.0%
arithmetical 0.0%
assignment 0.0%
unary 100.0%
The commands GRANT and REVOKE are examples of :
DDL (Data Definition Language) 0.0%
DML (Data Manipulation Language) 0.0%
TCL (Transaction Control Language) 0.0%
DCL (Data Control Language) 100.0%
The table Comments has an auto incremented column called "Commentid" and a "UserComments" column, both of which store the comments of the users visiting the site. What will be the correct query to ...
Select usercomments From Comments Order by commentid 0.0%
Select usercomments From Comments Order by commentid desc 100.0%
Select usercomments From Comments Order by usercomments 0.0%
Select usercomments From Comments Order by usercomments desc 0.0%
We are creating Stored Procedure in Database and using "sp_" prefix in its name. Which of the following statements is correct in accordance with the performance of the Stored Procedure execution?
The prefix will speed up the execution as it is in cache and will always get executed with high priority 0.0%
The prefix will slow down the execution as the prefix is reserved for system stored procedures 85.0%
The performance will not be affected as "sp_" is just a prefix for a stored procedure 14.0%
The prefix will speed up the execution as prefix "sp_" is used for stored procedures by default 0.0%
We have a table named "Customer" which has a column named "Customerid" having datatype Integer. We need to fetch the output with column title: 'Customer id is (value of customerid from the table)'....
Select 'Customer id is' + customerid From Customer 0.0%
Select 'Customer id is' + CAST(customerid AS varchar) From Customer 100.0%
Select 'Customer id is' + CAST(customerid AS integer) From Customer 0.0%
Both a and b 0.0%
None of these 0.0%
What exactly is a Foreign key?
A Foreign key is a column or a set of columns that uniquely identifies rows in a table 0.0%
A Foreign key checks the number of columns in a table which have non-null values 0.0%
A Foreign key is used to match columns in other tables 83.0%
A Foreign key checks the number of rows in a table which have non-null values 16.0%
What exactly is a Super key?
A Super key is a column or a set of columns that uniquely identifies rows in a table 100.0%
A Super key checks the number of columns in a table which have non-null values 0.0%
A Super key is used to match columns in other tables 0.0%
A Super key checks the number of rows in a table which have non-null values 0.0%
What exactly is the Full-Text Catalog?
The Full-Text catalog is an index for searching specific keywords 0.0%
The Full-Text catalog is a file which contains full-text indexes 66.0%
The Full-Text catalog is basically an inbuilt function for checking the validation of a text 33.0%
The Full-Text catalog is a system trigger for checking text validation 0.0%
What is the function of "DBCC CHECKDB" command?
It checks the allocation of all the objects in the specified database 33.0%
It checks the structural integrity of all the objects in the specified database 33.0%
It checks for consistency in and between system tables in the specified database 33.0%
It checks the consistency of disk space allocation structures of a specified database 0.0%
What is the maximum storage capacity of XML data type in SQL SERVER 2005?
1GB 0.0%
2GB 100.0%
4GB 0.0%
What is wrong with the following query in accordance with performance? SELECT * FROM [Table_Name] WHERE LOWER(Field_Name) = 'name'
The required keyword ('name') is already in the LOWER case 12.0%
The query requires more time to convert to the LOWER case 25.0%
T-Sql is not case sensitive. Hence, the LOWER keyword is not required 62.0%
Instead of '=' the operator, 'LIKE' should be used 0.0%
What will be the output of the following SQL query? SET SHOWPLAN_TEXT ON GO SELECT * FROM abcsite.abctable GO
It will show the query plan and the estimated cost of running 55.0%
It will show all the rows of the "abctable" table 44.0%
It will show all the rows of the "abctable" table and the table structure 0.0%
It will show the identities and Constraints applied on this table 0.0%
What will the following query do? Delete Orders
It will remove the Orders Table from the database 0.0%
It will remove up to 1000 rows from the Orders Table 0.0%
It will remove all rows from the Orders Table 83.0%
It will remove all the rows as well as the indexes and constraints from the Orders Table 0.0%
It will produce error on execution 16.0%
Which among the following are the new datatypes introduced in the SQL Server 2005?
varchar (max) 20.0%
varbinary (max) 13.0%
nvarchar (max) 20.0%
nvarbinary (max) 6.0%
image 6.0%
uniqueidentifier 0.0%
xml 33.0%
Which clause will be used to extract data from Tables A and B having a similar structure but no relation between themselves?
Join 0.0%
Group By 0.0%
Order By 0.0%
Union All 75.0%
Where 25.0%
Which command is used to create User defined Data Type in the SQL SERVER 2005?
sp_addtype 16.0%
Create Type 83.0%
Create Data Type 0.0%
None of these 0.0%
Which data type in the SQL SERVER 2005 converts itself into the type of data that is inserted into it?
real 0.0%
rowversion 0.0%
type_var 0.0%
sql_variant 100.0%
monetary 0.0%
Which edition of the SQL SERVER 2005 will best meet the following scenario? A company has an online shopping website named www.shoppingxyz.com. It also has to handle its line of business portion. ...
SQL SERVER 2005 Enterprise Edition 0.0%
SQL SERVER 2005 Standard Edition 100.0%
SQL SERVER 2005 Workgroup Edition 0.0%
SQL SERVER 2005 Developer Edition 0.0%
SQL SERVER 2005 Express Edition 0.0%
Which functions does the following SQL QUERY perform? DBCC CHECKIDENT ('table_name', RESEED, new_reseed_value)
It checks the current identity field value of the specified table 44.0%
It sets the identity field value to the new reseed value 55.0%
It sets the identity field value to 1 0.0%
None of the above 0.0%
Which is the best method to handle errors and deadlocks?
Errors and deadlocks can be handled by using stored procedures 0.0%
Errors and deadlocks can be handled by using cursors 0.0%
Errors and deadlocks can be handled by using Try and Catch constructs 100.0%
Errors and deadlocks can be handled by using inline queries 0.0%
Which level of data abstraction describes the data that is stored in the database and their corresponding relationships?
View Level 0.0%
Procedural Level 0.0%
Physical Level 0.0%
Logical Level 100.0%
Conceptual Level 0.0%
Which of the following "insert queries" will be inserted in the XML field? The creation query of the table is: CREATE TABLE Branches(recordID int, description XML)
INSERT Into Branches(recordID, description) VALUES(1, '<log><application>Sales</application><description>The connection timed out.</description></log>') 83.0%
INSERT UniversalLog(recordID, description) VALUES(1, 'database unavailable') 16.0%
INSERT Into Branches(recordID, description) VALUES(1, '<log><application>Sales<description>The connection timed out') 0.0%
XML cannot be inserted into database 0.0%
XML can be inserted but syntax in all queries is wrong 0.0%
Which of the following are correct?
With DDL, you can create and remove tables, schemas, domains, indexes and views 100.0%
Select, Insert and Update are DCL commands 0.0%
Grant and Revoke are DML commands 0.0%
Commit and Rollback are DCL commands 0.0%
Which of the following are not Database Models?
Hierarchical model 0.0%
Network model 0.0%
Composite model 50.0%
Relational model 0.0%
Recursive model 50.0%
Which of the following are the SQL Transaction statements?
REVERT STATEMENT 0.0%
ROLLBACK STATEMENT 50.0%
START STATEMENT 0.0%
COMMIT STATEMENT 50.0%
END STATEMENT 0.0%
Which of the following clauses are not allowed in a single row sub-query?
From 0.0%
Where 0.0%
Group by 33.0%
Having 33.0%
Order by 33.0%
Which of the following commands will be used to see the structure of the table named 'salary'?
sp_helptext salary 0.0%
sp_define salary 0.0%
sp_help salary 100.0%
define salary 0.0%
Which of the following is a database object?
Tables 0.0%
Stored Procedures 0.0%
Indexes 0.0%
UDF(User Defined Functions) 0.0%
All of the above 100.0%
Which of the following is not a Data type in the SQL SERVER 2005?
ntext 0.0%
nvarchar(n) 0.0%
xml 0.0%
nsmallmoney 100.0%
Which of the following is not a logical operator?
between 0.0%
any 0.0%
some 0.0%
like 0.0%
with 100.0%
Which of the following is not a Method call of .NET class for Assemblies in the SQL Server?
Init 0.0%
Accumulate 0.0%
Aggregate 100.0%
Merge 0.0%
Terminate 0.0%
Which of the following is not a relational operation?
Restriction 0.0%
Extraction 100.0%
Projection 0.0%
Intersection 0.0%
Union 0.0%
Which of the following is not a type of Database backup in the SQL SERVER 2005?
Complete backup 75.0%
Differential backup 0.0%
Transaction Log backup 0.0%
Partial backup 25.0%
File(s) and Filegroup(s) backup 0.0%
Which of the following is not an Aggregate function?
AVG() 0.0%
LEN() 100.0%
COUNT() 0.0%
SUM() 0.0%
MAX(column) 0.0%
Which of the following is the new sample database in the SQL SERVER 2005?
Northwind 0.0%
pubs 0.0%
AdventureWorks 100.0%
master 0.0%
tempdb 0.0%
Which of the following mechanisms is used by "ENCRYPTION by passphrase" to encrypt the data in the SQL SERVER 2005?
DES (Data Encryption Standard) 0.0%
AES (Advanced Encryption Standard) 0.0%
user defined password 100.0%
Which of the following methods is used to backup the Transaction log on to a secondary database in order to backup and recover data in a synchronized manner?
Using the backup of Transaction log (ldf) file 25.0%
Taking Backup using flat files 0.0%
Using Log Shipping 75.0%
Taking Database Snapshot of Transaction log 0.0%
Which of the following operators perform pattern matching?
% 50.0%
_ (underscore) 50.0%
= 0.0%
== 0.0%
is = 0.0%
Which of the following operators will be evaluated first in the following statement? Select (salary+40^2*30/5) from employees
+ 0.0%
* 100.0%
/ 0.0%
^ 0.0%
Which of the following SQL queries correctly selects the rows from the table "employees" that have NULL value in the "salary" column?
SELECT * FROM employees WHERE salary=null 0.0%
SELECT * FROM employees WHERE salary equals null 0.0%
SELECT * FROM employees WHERE salary is null 100.0%
SELECT * FROM employees WHERE salary contains null 0.0%
Which of the following statements is correct?
Modifications made in a table will be faster if the number of indexes is more 0.0%
Modifications made in a table will be slower if the number of indexes is more 100.0%
The number of indexes does not affect the modification process of a table 0.0%
Which of the following statements is wrong?
Truncate is faster than Delete 0.0%
Truncate is a DDL command 0.0%
Truncate retains the identity of the table 100.0%
Truncate cannot be rolled back 0.0%
Truncate removes all rows from the table 0.0%
Which of the following statements is/are wrong?
Both Primary key and Unique key enforce uniqueness 0.0%
Primary keys create a clustered index by default 0.0%
Both Primary key and Unique key don't allow NULL values 50.0%
Unique keys create a non-clustered index by default 12.0%
It is possible to have more than one Primary key in a table 37.0%
Which of the following statements regarding "views" are incorrect?
A view has a data of its own 50.0%
Data can be inserted into the table using its own view 0.0%
Data can be updated in the table using its own view 0.0%
A table can be altered by altering its corresponding view 50.0%
A View is derived from another table 0.0%
Which of the following statements regarding Trigger and Stored Procedures is correct?
Triggers are fired manually and Stored Procedures are fired automatically 0.0%
Triggers can call Stored Procedures but Stored Procedures cannot call Triggers 100.0%
Both Stored Procedures and Triggers can pass parameters 0.0%
None of These 0.0%
Which one of the following statements about Indexes is wrong?
Indexes are created in an existing table to locate rows more quickly and efficiently 0.0%
It is possible to create an index on one or more columns of a table 0.0%
A table is scanned when index is not available 0.0%
Indexes can only be implemented on integer datatypes 100.0%
Which one of the following statements is correct?
You can create DDL triggers 0.0%
You can create DML triggers 0.0%
Both a and b are correct 100.0%
Neither a nor b is correct 0.0%
Which one of the following statements regarding "views" is incorrect?
A view is like a window through which data on tables can be viewed or changed 50.0%
A view is stored as a select statement only 0.0%
A view cannot be derived from another view 50.0%
A view has no data of its own 0.0%
Which query will be used for a particular column of a table, if 'Reading' is to be replaced by 'Writing'?
Update [Table Name] set [Field Name]= (replace('Reading','Writing')) 0.0%
Update [Table Name] set [Field Name]= (replace('Writing',' Reading')) 0.0%
Update [Table Name] set [Field Name]= (replace([Field Name],' Writing')) 0.0%
Update [Table Name] set [Field Name]= (replace([Field Name],' Reading ')) 0.0%
Update [Table Name] set [Field Name]= (replace([Field Name],'Reading','Writing')) 100.0%
Update [Table Name] set [Field Name]= (replace([Field Name],'Writing ','Reading')) 0.0%
Why are Joins generally better than the Correlated sub-query?
The Correlated sub-query scans the whole table 0.0%
Joins pick up the rows according to the condition of the queries 50.0%
The Correlated sub-query creates a nested loop 50.0%
The Correlated sub-query makes the statement complex 0.0%
You have a database named 'marketnikkie', the backup of which is stored at 'D:marketnikkie.bak' location on your server. Due to some electric fluctuations, the database gets corrupt. Which of the ...
RESTORE DATABASE marketnikkie FROM DISK = 'D:marketnikkie.bak' 100.0%
RESTORE DATABASE FROM DISK = 'D:marketnikkie.bak' 0.0%
RESTORE DATABASE marketnikkie FROM = 'D:marketnikkie.bak' 0.0%
RESTORE marketnikkie FROM DISK = 'D:marketnikkie.bak' 0.0%
RESTORE DATABASE marketnikkie.mdf FROM DISK = 'D:marketnikkie.bak' 0.0%
You have a table "engineers" with the following table structure: enggid int(4) deptname varchar(50) salary int(4) You want to display the minimum and maxi...
select deptname, min(salary) as Minimum, max(salary) as Maximum from engineers 0.0%
select deptname, min(salary) as Minimum, max(salary) as Maximum from engineers group by deptname 100.0%
select deptname, min(salary) as Minimum, max(salary) as Maximum from engineers group by salary 0.0%
select deptname, min(salary) as Minimum, max(salary) as Maximum from engineers order by deptname 0.0%
None of these 0.0%
You have a table "engineers" with the following table structure: enggid int(4) name varchar(50) salary int(4) You want to select the top 2 engineers in...
SELECT TOP 2 * FROM engineers ORDER BY max(salary) DESC 0.0%
SELECT TOP 2 * FROM engineers ORDER BY salary DESC, GROUP BY salary 0.0%
SELECT TOP 2 * FROM engineers GROUP BY salary DESC 0.0%
SELECT TOP 2 * FROM engineers ORDER BY salary DESC 50.0%
SELECT TOP 2 [name], salary FROM engineers ORDER BY salary DESC 50.0%
You have a table named 'employees', having the following structure. empid int(4) deptname varchar(50) salary int(4) And a view is created as follows: create view viemployees as select * from empl...
insert into employees values (1010, HR, 10000) 0.0%
insert into employees values (1010, 'HR', 10000) 50.0%
insert into viemployees values (1010, 'HR', 10000) 50.0%
insert into viemployees (empid, deptname, salary) values (1010, HR, 10000) 0.0%
insert into employees (empid, deptname, salary) set values (1010, 'HR', 10000) 0.0%
You have a table named "employees" with the following table structure: empid int(4) deptname varchar(50) salary int(4) The following select query is execu...
The above SQL query will give an error 0.0%
Records will be shown with the salary field displayed in the descending order 0.0%
Records will be shown with the deptname field in the ascending order and salary in the descending order 0.0%
Records will be shown with the deptname field and the salary field in the descending order 100.0%
Records will be shown in a jumbled manner 0.0%
You have two tables emp_1 and emp_2, having the following data: Table emp_1 Name Date Robert 1/5/2008 John 1/6/2008 Michael 1/7/2008...
1/6/2008, 1/10/2008, 1/11/2008, 1/12/2008 0.0%
1/6/2008, 1/10/2008, 1/10/2008 0.0%
1/6/2008, 1/10/2008, 1/11/2008, 1/12/2008, 1/12/2008 0.0%
1/6/2008, 1/10/2008 100.0%
The query will give an error as EXCEPT is only concerned with varchar values 0.0%
You want to select a row using cursors in the table 'qlist'. Which of the following statements DECLARES a cursor 'qselect' to perform the desired operation?
DECLARE qselect CURSOR ON SELECT * FROM qlist 0.0%
DECLARE qselect CURSOR FOR SELECT * FROM qlist 100.0%
DECLARE qlist CURSOR ON SELECT * FROM qselect 0.0%
DECLARE qselect CURSOR AS SELECT * FROM qlist 0.0%