Tag: databases

Questions Related to databases

  1. Temporary Space

  2. Spool Space

  3. Permanent Space

  4. Any of the above


Correct Option: B
  1. Permanent Table and Stored Procedure

  2. Permanent View and Stored Procedure

  3. Macros and Stored Procedure

  4. None of the above


Correct Option: A
  1. Permanent Table

  2. Set Table

  3. Multiset Table

  4. Volatile Table


Correct Option: D
  1. Indexes are only used in special cases

  2. Indexes are used to make table storage more efficient

  3. Indexes rarely make a difference in SQL performance

  4. Indexes exist solely to improve query speed


Correct Option: D
  1. The number of CPUs on the server

  2. The degree of parallelism on the tables

  3. The quality of the SQL optimization

  4. The use of bitmap indexes


Correct Option: C
  1. We are joining two tables only

  2. we are using left and right join together

  3. we are joining table to itself

  4. we are joining more than 2 tables


Correct Option: C
  1. SELECT * FROM Contest WHERE ContestDate >= '05/25/2006'

  2. SELECT * FROM Contest GROUPBY ContestDate >= '05/25/2006'

  3. SELECT * FROM Contest WHERE ContestDate < '05/25/2006'

  4. SELECT * FROM Contest HAVING ContestDate >= '05/25/2006'


Correct Option: A
Explanation:

To solve this question, the user needs to know the syntax of SQL SELECT statements, how to select all rows from a table, how to specify column names, and how to use the WHERE clause to filter rows based on a certain condition.

Now, let's go through each option and explain why it is right or wrong:

A. SELECT * FROM Contest WHERE ContestDate >= '05/25/2006': This option is correct. This statement selects all columns and rows from the Contest table where the ContestDate column has a value greater than or equal to May 25, 2006. The date is specified in the format MM/DD/YYYY, which is a valid format for SQL.

B. SELECT * FROM Contest GROUPBY ContestDate >= '05/25/2006': This option is incorrect because it contains a syntax error. The GROUP BY clause is used to group rows based on a certain criteria, not to filter them. Also, the condition is not valid in the GROUP BY clause.

C. SELECT * FROM Contest WHERE ContestDate < '05/25/2006': This option is incorrect because it selects all rows from the Contest table where the ContestDate column has a value less than May 25, 2006. The question asks for values greater than or equal to that date.

D. SELECT * FROM Contest HAVING ContestDate >= '05/25/2006': This option is incorrect because the HAVING clause is used to filter rows based on a condition that involves an aggregate function. It cannot be used to filter rows based on a simple comparison like the one specified in this question.

The Answer is: A