Set - 3

Question 21 :

What are the wildcards used for pattern matching.?

Answer :

_ for single character substitution and % for multi-character substitution.

Question 22 :

What is the parameter substitution symbol used with INSERT INTO command?

Answer :


Question 23 :

What's an SQL injection?

Answer :

SQL Injection is when form data contains an SQL escape sequence and injects a new SQL query to be run.

Question 24 :

What is difference between TRUNCATE & DELETE ?

Answer :

TRUNCATE commits after deleting entire table i.e., cannot be rolled back. Database triggers do not fire on TRUNCATE
DELETE allows the filtered deletion. Deleted records can be rolled back or committed. Database triggers fire on DELETE.

Question 25 :

What is a join? Explain the different types of joins?

Answer :

Join is a query, which retrieves related columns or rows from multiple tables.
Self Join - Joining the table with itself.
Equi Join - Joining two tables by equating two common columns.
Non-Equi Join - Joining two tables by equating two common columns.
Outer Join - Joining two tables in such a way that query can also retrieve rows that do not have corresponding join value in the other table.