Oracle
Aurora
MySql
PostgreSql
Sql Server
100

What is the full form of  PL/SQL?

Procedural Language extensions to the Structured Query Language

100

Name two DBs using SQL?

Oracle, MySQL, DB2

100

What is the output of this? (in oracle)

select 'PL sql' from dual;

'PLSQL'

 PL sql

100

On Whose order Kattappa killed Bahubali?

Rajmata Shivgami

100

What aggregate function would you use to get average of values of a number column?

AVG

200

What is the output of this?

SELECT  TO_CHAR( SYSDATE-5, 'FMMonth DD, YYYY' ) RightDate FROM dual;

RIGHTDATE

September 13, 2020

200

What kind of SQL statement is 'INSERT'?

Data Manipulation Language (DML) Statement

200

What is the max integer we can fit in number(7,2) datatype?

99999

200

What kind of SQL statement is 'ALTER'?

Data Definition Language (DDL) Statement

200

Who plays Ram's role in Ramanand Sagar's Ramayan?

Arun Govil

300

Output of this?

SELECT  id, Country FROM Customers GROUP BY Country;

Not a group by expression.

300

By what name Scarlett Johansson's character is known as in Marvel Movies?

Black Widow: Natasha Romanova

300

What is the difference between DISTINCT and UNIQUE?

UNIQUE is a constraint and DISTINCT keyword is used while querying our results.

300

 What is an Inner Join?

The INNER JOIN keyword selects records that have matching values in both tables.

300

What would this do?

SELECT * INTO Records FROM Customers;

Creates a backup copy of Customers as a new table Records

400

How many grand slam titles have Roger Federer won?

20

400

What would this do?

select * from customers WHERE CustomerName LIKE 'a_%_%';

Finds any values that starts with "a" and are at least 3 characters in length

400

What will this do?

SELECT CustomerName FROM Customers UNION ALL

SELECT City FROM Suppliers ORDER BY City;

Union of Customer name and City

400

What would this do?

SELECT SupplierName FROM Suppliers WHERE EXISTS (SELECT ProductName FROM Products WHERE Products.SupplierID = Suppliers.supplierID AND Price = 22);

Returns TRUE and lists the suppliers with a product price equal to 22:

400

What is the output?

CREATE TABLE Orders ( OrderID int NOT NULL,    OrderNumber int NOT NULL, PersonID int,    PRIMARY KEY (OrderID),  CONSTRAINT FK_PersonOrder FOREIGN KEY (PersonID)    REFERENCES Persons(PersonID));

insert into Orders(ID,PersonId) values (10,55);

OrderNumber Cannot be null;

500

What is the code doing?


   DECLARE

   CURSOR c1 is

      SELECT ename, empno, sal FROM emp

         ORDER BY sal DESC;   

   my_ename VARCHAR2(10);

   my_empno NUMBER(4);

   my_sal   NUMBER(7,2);

BEGIN

   OPEN c1;

   FOR i IN 1..5 LOOP

      FETCH c1 INTO my_ename, my_empno, my_sal;

      EXIT WHEN c1%NOTFOUND; 

      INSERT INTO temp VALUES (my_sal, my_empno, my_ename);

      COMMIT;

   END LOOP;

   CLOSE c1;

END;


select the five highest paid employees from the emp table

500

 What is the output of the following?  

DECLARE

  WELCOME varchar2(10) := 'weLcome'; 

BEGIN

  DBMS_Output.Put_Line("welcome"); 

END;

/

 identifier 'welcome' must be declared

500

When was USSR disintegrated completely?

Dec 25, 1991

500

What is the output of the following?  

CREATE OR REPLACE PROCEDURE pri_bool(

  boo_name   VARCHAR2,

  boo_val    BOOLEAN

) IS

BEGIN

  IF boo_val IS NULL THEN

    DBMS_OUTPUT.PUT_LINE( boo_name || ' IS ');

  ELSIF boo_val = TRUE THEN

    DBMS_OUTPUT.PUT_LINE( boo_name || ' IS NOT');

  ELSE

    DBMS_OUTPUT.PUT_LINE( boo_name || ' What?');

  END IF;

  DBMS_OUTPUT.PUT_LINE( ' Fun ');

END;

/

exec pri_bool('PL-SQL',null);

PL-SQL IS Fun.

500

When did Oracle buy MySql?

In January 2008, Sun Microsystems bought MySQL AB for $1 billion. In April 2009, Oracle Corporation entered into an agreement to purchase Sun Microsystems, then owners of MySQL.

M
e
n
u