Computer Knowledge

Database and SQL

4,213 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. 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 programming languages
  1. EVALUATE … END-EVALUATE

  2. SWITCH CASE

  3. CASE … END-CASE

  4. None of the above

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

The question asks about conditional execution based on a field value in Easytrieve. Option C 'CASE...END-CASE' is claimed correct and is indeed the Easytrieve construct for multi-way branching similar to switch/case in other languages. Option A 'EVALUATE' is not valid Easytrieve syntax. Option B 'SWITCH CASE' is not correct syntax. Option D is incorrect since CASE...END-CASE exists.

Multiple choice technology testing
  1. A. Call the ADO.Close function

  2. B. Use the close method for the RecordSet object

  3. C. Set the RecordSet and Connection objects equal to Nothing

  4. D. Use the close method for the RecordSet and Connection objects

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

To properly clean up database resources in VBScript/ADO, you must explicitly call the .Close method on both the RecordSet and Connection objects to terminate the active session.

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.

Multiple choice technology databases
  1. Outer Join view (complex view) is not updateable

  2. USER_View contain Status of view

  3. USER_ViEw NOT contain Status of view

  4. DML opration may NOT applied on view having Group by clasue

Reveal answer Fill a bubble to check yourself
A,C,D Correct answer