Computer Knowledge

Database and SQL

3,929 Questions

Master structured query language commands, database joins, table constraints, and alias generation. This section covers relational database management concepts and query outputs essential for technical aptitude. These technical questions feature prominently in banking IT officer exams and computer knowledge sections.

SQL queries and aliasesDatabase table constraintsDatabase joins and transformationsStored procedures and functions

Database and SQL Questions

Multiple choice
  1. Format

  2. Default Value

  3. Required

  4. Indexed

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The Required property forces users to enter a value in a field - it cannot be left blank. Format controls display appearance, Default Value provides an automatic value, and Indexed improves search performance but doesn't enforce data entry.

Multiple choice
  1. Default Value

  2. Primary Key

  3. Indexed

  4. Required

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The Primary Key property uniquely identifies each record in a table - no two records can have the same primary key value. Default Value sets automatic values, Indexed speeds up searches, and Required prevents blank fields but doesn't guarantee uniqueness.

Multiple choice
  1. getMaxColumnLength()

  2. getMaxColumnNameLength()

  3. getMaxColNameLength()

  4. getMaxColLength()

  5. getColumnNameLength()

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This is the correct option because getMaxColumnNameLength() method is defined in DatabaseMetaData interface and it retrieves the maximum number of characters this database allows for a column name.

Multiple choice
  1. uniquely identifies the data in a row

  2. is also referred to as composite key

  3. is a unique identifier in a column

  4. must be accompanied by a corresponding foreign key

  5. is always a super key

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Yes, it is correct by defination.

Multiple choice
  1. To save information in a database after updation

  2. To identify a point in a transaction to which you can later roll back

  3. To save a table

  4. To save after RENAME a table

  5. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This is the function of a SAVEPOINT command.