SQL Interview Questions 1

1)  The NULL SQL keyword is used to …

represent 0 value.

represent negative infinity.

represent positive infinity.

represent a missing or unknown value. NULL in SQL represents nothing.

2) Which of the following is true?

TRUNCATE TABLE has to be used along with a WHERE clause

TRUNCATE TABLE is identical to DELETE statement without WHERE clause and both remove all rows in a table.

TRUNCATE TABLE deletes table from a database

3) Which of the following is true?

Column names need to be mentioned for INSERT statetements

Column names need not be mentioned for INSERT statements

4) Normalization is…

a special way of selecting data

the process of arranging information stored in a database in a way, which removes redundancy and ambiguity.

the process of adding primary key to a table

5) Which of the following statements gets the total value of the column ‘Price’ in the ‘Sales’ table?

SELECT SUM(Price) FROM Sales

SELECT SUM(Price) WHERE Sales

SELECT TOTAL(Price) FROM Sales

SELECT ADD(Price) FROM Sales

6) What are the data types you know in teradata?

BLOB, BYTE, VARBYTE,
CASESPECIFIC, CHAR, CHAR SET, VARCHAR, LONG VARCHAR, UPPERCASE
DECIMAL, FLOATING POINT, GRAPHIC, INTEGERS, HEXADECIMAL, SMALLINT
TIME, TIMESTAMP, DATE
7) Difference between UNION and UNION ALL
8) What statement is used to add columns?
9) What is the toughest SQL you have worked on?
10) Which SQL took the longest time to run in your previous assignment?
11) Have you used CURSORs? Why do we use CURSORS?
12) Difference between ANY and ALL.

2 thoughts on “SQL Interview Questions 1

Leave a Reply

Your email address will not be published. Required fields are marked *