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. GET

  2. EXTRACT

  3. SELECT

  4. VIEW

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

SELECT is the primary SQL command for retrieving and querying data from databases. It specifies which columns to fetch and from which tables, with optional filtering and sorting.

Multiple choice
  1. It is used to add an integrity constraint to a table.

  2. It is used to redefine a column of the table.

  3. It is used to change a table's storage characterstics.

  4. It is used to create tables and definine columns.

  5. It enables or disables integrity constraints.

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

This option is correct as CREATE TABLE command creates a table in the database.

Multiple choice
  1. Alter table

  2. Resize

  3. Drop

  4. Change Size

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

The alter statement is used to resize a column.  The size of a column can both be increased or decreased using the alter keyword. Normally, the size of a column can be increased to a large value but it can only be decreased to the limit that if there is data present in the column, it should not get trimmed.

Multiple choice
  1. Structured Question Lanaguage

  2. Strurctured Queried Language

  3. Structured Query Language

  4. Structured Queries Language

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

It is the language to handle basic database operations like creating a table and managing it. Some of the keywords of SQL are Create,Select, Delete, Update etc.. SQL is also sometimes called SEQUEL which stands for Simple English Like Query Language. SQL is supported by all the major RDBMS products like Oracle, Ms-SQL Server, MySQL to name a few.

Multiple choice
  1. & and *

  2. % and *

  3. % and _ (underscore)

  4. $ and _ (underscore)
Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The Like operator is used for pattern matching in VARCHAR columns. It is useful in conditions where we do not to compare a value exactly with another. For example, if we want to search for all the persons whose names start with  A, we can use the Like operator with the wildcard character. % is used for substituting a string. For conducting a character replacement we can use the _ (underscore) operator. It is used for matching values that are of a particular length.