Q11. What are the possible values for a BOOLEAN field in MySQL?
MySQL doesn't have a native `BOOLEAN` type. It uses `TINYINT(1)` where `0` = false, `1` = true, and any non-zero value is treated as true in conditions. ```sql CREATE TAB...
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 (119 available).
MySQL doesn't have a native `BOOLEAN` type. It uses `TINYINT(1)` where `0` = false, `1` = true, and any non-zero value is treated as true in conditions. ```sql CREATE TAB...
When storing distance rounded to the nearest whole mile, an **integer data type** is the optimal choice: ```sql ALTER TABLE travel_logs ADD COLUMN distance_miles INT NOT ...
`SELECT`, `FROM`, `WHERE`, `GROUP BY`, `HAVING`, `ORDER BY`, `JOIN`, `INSERT`, `UPDATE`, `DELETE`, `CREATE`, `ALTER`, `DROP`, `INDEX`, `UNION`, `LIMIT`, `DISTINCT`, `AS`,...
SQL supports both single-line and multi-line commenting syntax across relational database engines: ### 1. Single-Line Standard Comment (`--`): The official ANSI SQL stand...
`SELECT`. Optional clauses: `WHERE`, `GROUP BY`, `HAVING`, `ORDER BY`, `LIMIT`, `JOIN`. ```sql SELECT name AS full_name, salary * 12 AS annual_salary FROM employees WHERE...
```sql SELECT * FROM products; ``` ⚠️ *Interview tip*: Always follow up with "But in production, I list explicit columns to reduce network overhead and prevent breaking i...
Yes, using `AS` (alias): ```sql SELECT first_name AS fname, last_name AS lname FROM customers; -- AS is optional but recommended for readability: SELECT first_name fname ...
To retrieve only the `FirstName` column from the `Customers` table, use the standard `SELECT` projection statement: ```sql SELECT FirstName FROM Customers; ``` ### Perfor...
The **`FROM`** clause identifies the source table(s), views, joined tables, or subqueries from which data is to be retrieved, filtered, and aggregated. ### Logical SQL Pr...
`SELECT DISTINCT`. It operates on the *entire selected row*. ```sql -- Returns unique city-state combinations SELECT DISTINCT city, state FROM addresses; ```
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.