1. Question: 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 maximum salaries of the individual departments. Which of the following queries will fetch the desired results?

    A
    select deptname, min(salary) as Minimum, max(salary) as Maximum from engineers

    B
    select deptname, min(salary) as Minimum, max(salary) as Maximum from engineers group by deptname

    C
    select deptname, min(salary) as Minimum, max(salary) as Maximum from engineers group by salary

    D
    select deptname, min(salary) as Minimum, max(salary) as Maximum from engineers order by deptname

    E
    None of these

    Note: Not available
    1. Report
  2. Question: Which of the following are correct?

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

    B
    Select, Insert and Update are DCL commands

    C
    Grant and Revoke are DML commands

    D
    Commit and Rollback are DCL commands

    Note: Not available
    1. Report
  3. Question: 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)'. What will be the query?

    A
    Select 'Customer id is' + customerid From Customer

    B
    Select 'Customer id is' + CAST(customerid AS varchar) From Customer

    C
    Select 'Customer id is' + CAST(customerid AS integer) From Customer

    D
    Both

    E
    None of these

    Note: Not available
    1. Report
  4. Question: Which of the following statements is wrong?

    A
    Truncate is faster than Delete

    B
    Truncate is a DDL command

    C
    Truncate retains the identity of the table

    D
    Truncate cannot be rolled back

    E
    Truncate removes all rows from the table

    Note: Not available
    1. Report
  5. Question: 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 display the latest comments first?

    A
    Select usercomments From Comments Order by commentid

    B
    Select usercomments From Comments Order by commentid desc

    C
    Select usercomments From Comments Order by usercomments

    D
    Select usercomments From Comments Order by usercomments desc

    Note: Not available
    1. Report
  6. Question: 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?

    A
    The output will always be "No comments" irrespective of the value in the Comments field

    B
    The output will be null in all the rows

    C
    The output will be "No comments", when the database entry is Null

    D
    The output will be "No comments", when the database entry is Not Null

    E
    This query is erroneous

    Note: Not available
    1. Report
  7. Question: What is the maximum storage capacity of XML data type in SQL SERVER 2005?

    A
    1GB

    B
    2GB

    C
    4GB

    Note: Not available
    1. Report
  8. Question: Columns are called _____________ of a table in a relational model.

    A
    Tuples

    B
    Elements

    C
    Objects

    D
    Attributes

    E
    Constraints

    Note: Not available
    1. Report
  9. Question: Which is the best method to handle errors and deadlocks?

    A
    Errors and deadlocks can be handled by using stored procedures

    B
    Errors and deadlocks can be handled by using cursors

    C
    Errors and deadlocks can be handled by using Try and Catch constructs

    D
    Errors and deadlocks can be handled by using inline queries

    Note: Not available
    1. Report
  10. Question: Which of the following is not a Data type in the SQL SERVER 2005?

    A
    ntext

    B
    nvarchar(n)

    C
    xml

    D
    nsmallmoney

    Note: Not available
    1. Report
Copyright © 2025. Powered by Intellect Software Ltd