11) What is UNION,UNION ALL? –
UNION : eliminates duplicates
UNION ALL: retains duplicates
Both these are used to combine the results of different SELECT
statements.
Suppose I have five SQL SELECT statements connected by UNION/UNION ALL, how
many times should I specify UNION to eliminate the duplicate rows? -
Once.
12) What is the restriction on using UNION in embedded SQL?
It has to be in a CURSOR.
13) In the WHERE clause what is BETWEEN and IN? –
BETWEEN supplies a range of values while IN supplies a list of values.
14) Is BETWEEN inclusive of the range values specified? –
Yes.
15) What is 'LIKE' used for in WHERE clause? What are the wildcard
characters? –
LIKE is used for partial string matches. ‘%’ ( for a string of any character
) and ‘_’ (for any single character ) are the two wild card characters.
|