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
  1. select empname from emp where datediff(curdate(),joiningdate)>20;

  2. select empname from emp where datediff(curdate(),joiningdate)>200;

  3. select empname from emp where datediff(joiningdate,curdate())>200;

  4. select from emp where datediff(curdate(),joiningdate)>200;

  5. none of these

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

datediff produces the difference of its two arguments in days. Hence currentdate, when subtracted with the joining date gives the number of days.

Multiple choice text document and word processing introduction to word visual communication information communication technology (ict) physics

You have inserted a table comprising two rows and three columns and added data to it. What would happen when you select the table as shown in the given snapshot and then click on uparrow command button available in Table Tools in MS-Word $2010$? 

Subject Pages Author
Mathematics $260$  R.S.Gupta


  1. One row will get inserted at the top of table.

  2. Data of both rows will get merged.

  3. Two blank rows will get inserted at the top of given table.

  4. Table will get split into two tables.

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

In MS Word 2010, selecting a table and clicking the 'Insert Rows Above' command (often represented by an arrow icon) adds rows to the table. Selecting the entire table and clicking this typically adds rows equal to the number of rows selected.

Multiple choice
  1. Deletes

  2. Disables

  3. Creates

  4. Changes

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

In SQL, the DROP command is used to remove an entire database object, such as a table or a database, permanently from the system.

Multiple choice
  1. A String

  2. A Statement

  3. A Query

  4. A Variable

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

An SQL statement is a command or instruction sent to a database management system to perform an action, commonly referred to as a query.

Multiple choice
  1. Grab the Database

  2. Grab a Single Column

  3. Grab all the Columns

  4. SELECT a Varchar

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

The asterisk (*) is a wildcard character in SQL that instructs the database to return all columns associated with the specified table.