Question
A jar contains 9 purple balls, 6 brown balls and 5 orange
balls. Two balls are taken at random. What is the probability that at least one of them is orange?Solution
Total balls = 9 + 6 + 5 = 20
Non-orange balls = 9 + 6 = 15
Required probability = 1 - (15/20) × (14/19)
= 1 - (210/380)
= 1 - (21/38)
= 17/38
What is the output of this SQL snippet if the price column contains NULL values?
SELECT SUM(price) FROM products;
What is the result of SELECT COUNT(NULL) on any table?
Which operator is used to combine results of two SELECT queries and remove duplicates?
In SQL, the ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW clause applies to:
Which SQL command is used to remove a table completely?
Which of the following is true about a foreign key?
SQL Injection can be prevented by all EXCEPT:
Which PL/SQL cursor attribute returns `TRUE` if the most recent `FETCH` statement returned a row, and `FALSE` otherwise?
Which command removes all rows but keeps table structure?
Which SQL constraint ensures a column cannot have NULL values?