MCQs
In an SQL statement where clause states the conditions for row selection.
GRANT is the keyword which is used with Data Control Language statements.
Sub-query that is placed within a WHERE or HAVING clause of another query.
With RENAME statement you can rename a table.RENAME, REVOKE and GRANT are DDL commands and UPDATE is DML command.
Create, Delete, Alter these are 3 main command.
Stack works on the First In Last Out.
INSTR function in SQL is used to find the starting location of a pattern in a string. The syntax for the INSTR function is as
follows:INSTR(str,pattern):Find the starting location of pattern in string str and SUBSTR Function:- The Substring function in SQL is used to grab a portion of the stored data.
Sometimes we need to change the data type of a column. To do this, we use the ALTER TABLE Modify Column ALTER TABLE table_name, MODIFY column_name "New Data Type.
SELECT SYSDATE “ SYSDATE FROM DUAL; outputs 0 SELECT SYSDATE “ (SYSDATE “ 2) FROM DUAL; outputs 2
SELECT SYSDATE “ (SYSDATE + 2) FROM DUAL; outputs -2.
The HAVING clause was added to SQL because the WHERE keyword could not be used with aggregate functions.