Q81. Which set operator for "searched but didn't buy"?
`MINUS` (Oracle) or `EXCEPT` (PostgreSQL/SQL Server): ```sql SELECT name FROM searchers WHERE product = 'X' EXCEPT SELECT name FROM buyers WHERE product = 'X'; ``` ---
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (142 available).
`MINUS` (Oracle) or `EXCEPT` (PostgreSQL/SQL Server): ```sql SELECT name FROM searchers WHERE product = 'X' EXCEPT SELECT name FROM buyers WHERE product = 'X'; ``` ---
A `SELECT` statement nested inside another SQL statement to supply values for filtering or computation is called a **subquery** (also known as an **inner query** or **nes...
Subqueries can be nested within virtually every major SQL clause and statement: 1. **`WHERE` Clause**: Filtering candidate rows (`WHERE id IN (SELECT ...)`) 2. **`FROM` C...
`IN`, `ANY`, `ALL`, `EXISTS`, `NOT EXISTS`, and standard comparison operators (`=`, `>`, `=`, ` ALL (SELECT salary FROM employees WHERE dept = 'Sales') WHERE salary > ANY...
A subquery placed inside another subquery is called a **nested subquery** (or multi-level subquery): ```sql SELECT customer_name FROM customers WHERE customer_id IN ( SEL...
A **correlated subquery**. It executes once for each row of the outer query. ```sql SELECT * FROM employees e WHERE salary > (SELECT AVG(salary) FROM employees WHERE dept...
SQL's version of IF-THEN-ELSE. Two forms: simple and searched. ```sql -- Searched CASE (more flexible) SELECT name, CASE WHEN salary >= 100000 THEN 'Executive' WHEN salar...
DDL (CREATE, ALTER, DROP, TRUNCATE), DML (INSERT, UPDATE, DELETE, SELECT), DQL (SELECT — sometimes grouped with DML), DCL (GRANT, REVOKE), TCL (COMMIT, ROLLBACK, SAVEPOIN...
**DDL** stands for **Data Definition Language**. DDL statements define, alter, and destroy database schema structures (tables, indexes, views, schemas, constraints): ### ...
**DML** stands for **Data Manipulation Language**. DML commands manage, insert, retrieve, and modify actual data rows stored inside database tables: ### Core DML Statemen...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.