Q51. Which operator searches text patterns?
`LIKE` with wildcards `%` (zero or more chars) and `_` (single char). ```sql WHERE name LIKE 'A%' -- starts with A WHERE name LIKE '%a%' -- contains a WHERE name LIKE '_a...
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).
`LIKE` with wildcards `%` (zero or more chars) and `_` (single char). ```sql WHERE name LIKE 'A%' -- starts with A WHERE name LIKE '%a%' -- contains a WHERE name LIKE '_a...
To find records where a text column begins with a specific letter or prefix, use the **`LIKE`** operator with the `%` wildcard: ```sql SELECT * FROM Students WHERE FirstN...
The **`BETWEEN`** operator selects values within an inclusive range (numbers, text strings, or dates): ```sql SELECT product_id, name, price FROM products WHERE price BET...
```sql SELECT * FROM Sales WHERE Date BETWEEN '2017-12-01' AND '2018-01-01'; ``` Use ISO-8601 format (`YYYY-MM-DD`) to avoid locale issues.
To select records alphabetically between two string boundaries, use the `BETWEEN` operator: ```sql SELECT * FROM Customers WHERE LastName BETWEEN 'Brooks' AND 'Gray' ORDE...
Checks if a value matches any in a list. It's a shorthand for multiple ORs and often more readable. ```sql -- These are equivalent: WHERE state IN ('CA', 'NY', 'TX') WHER...
Converts to uppercase. `LOWER` to lowercase. `INITCAP` (Oracle/PostgreSQL) capitalizes first letter of each word. ```sql SELECT UPPER('hello'); -- HELLO ```
To round a numeric value up to the next nearest integer, use the **`CEIL()`** (or **`CEILING()`**) function: ```sql SELECT CEIL(25.01); -- Returns 26 SELECT CEIL(25.00); ...
In MySQL, you retrieve the current date (year, month, day) without the time component using **`CURDATE()`** or **`CURRENT_DATE`**: ```sql SELECT CURDATE(); -- Example: '2...
The keyword and aggregate function used to retrieve the maximum value of a column is **`MAX()`**: ```sql SELECT MAX(salary) AS highest_salary FROM employees; ``` ### With...
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.