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 technology databases
  1. DESCRIBE

  2. RENAME

  3. DELETE

  4. INSERT

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

DESCRIBE is an iSQL*Plus command that displays the structure of a table or other database object. RENAME, DELETE, and INSERT are SQL statements (DDL/DML), not iSQL*Plus-specific commands. DESCRIBE can be abbreviated as DESC and provides column names, data types, and constraints.

Multiple choice technology databases
  1. DROP

  2. MERGE

  3. CREATE

  4. COMMIT

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

MERGE is a DML (Data Manipulation Language) statement that combines insert and update operations based on a condition. DROP and CREATE are DDL (Data Definition Language), and COMMIT is a transaction control statement. DML includes SELECT, INSERT, UPDATE, DELETE, and MERGE.

Multiple choice technology databases
  1. National Language Set

  2. International Language Set

  3. Oracle Language Set

  4. SQL-99 compliant Language Set

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

National Language Support (NLS) parameters in Oracle are used to customize the display of date, time, currency, and language settings. International, Oracle, and SQL-99 compliant Language Sets are not standard terms for configuring these display formats.

Multiple choice technology databases
  1. multiply_months(x,y)

  2. add_months(x,y)

  3. devide_months(x,y)

  4. upper(x)

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

In Oracle SQL and PL/SQL, add_months is a built-in date function used to add a specified number of months to a date. Functions like multiply_months or devide_months do not exist.

Multiple choice technology databases
  1. multiply_months(x,y)

  2. add_months(x,y)

  3. devide_months(x,y)

  4. upper(x)

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

Oracle SQL provides the add_months(x, y) function to add a specified number of months to a date. The other options, multiply_months and devide_months, do not exist in Oracle SQL, while upper(x) is a character function used to convert text to uppercase.

Multiple choice technology web technology
  1. Using lookup() function

  2. Using Generate Records component

  3. Using re_index() function

  4. Using next_in_sequence() function

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

next_in_sequence() is the Ab Initio function designed specifically for generating surrogate keys by producing sequential, unique integer values. The lookup() function retrieves data, Generate Records is a component, and re_index() is for reindexing.

Multiple choice technology web technology
  1. Inner Join

  2. Explicit Join ( record-required 0 = true, record-required 1 = true )

  3. Explicit Join ( record-required 0 = false, record-required 1 = true )

  4. Explicit Join ( record-required 0 = true, record-required 1 = false )

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

The question requires a join that outputs matching records PLUS all unmatching records from In0. This is a left outer join where In0 is the left/preserved side. In AbInitio Explicit Join, record-required 0=false means In0 records are preserved even without matches, and record-required 1=true means In1 records require matches. Option C correctly shows this configuration: (record-required 0=false, record-required 1=true). Option A is inner join (both required). Option B requires matches from both sides. Option D would preserve In1, not In0.

Multiple choice technology databases
  1. &

  2. #

  3. @

  4. $
Reveal answer Fill a bubble to check yourself
C,D Correct answer
Explanation

In SQL table naming conventions, the special characters allowed (depending on database) include @ and $ in many systems like SQL Server and MySQL. The ampersand (&) and hash (#) characters are typically not allowed or have special meanings (e.g., # for temporary tables in some databases). Specific rules vary by database system, but @ and $ are commonly permitted for naming purposes.

Multiple choice technology programming languages
  1. Structure Query Language

  2. Structured Query Language

  3. Structure Queried Language

  4. None of the above

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

SQL stands for Structured Query Language. It's a standard programming language designed for managing and manipulating relational databases. SQL is used for querying, updating, and managing data in database management systems.

Multiple choice technology databases
  1. Table can have 100 column at MAX

  2. Table can have 1000 column at MAX

  3. Table can have 10,000 column at MAX

  4. Table can have unlimited column

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

SQL Server tables support up to 1024 columns, making 1000 the closest correct answer among the options provided.