Q121. Statement for assigning privileges?
`GRANT`. To remove: `REVOKE`. ```sql GRANT SELECT, INSERT ON database.orders TO 'app_user'@'%'; REVOKE DELETE ON database.orders FROM 'app_user'@'%'; ```
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).
`GRANT`. To remove: `REVOKE`. ```sql GRANT SELECT, INSERT ON database.orders TO 'app_user'@'%'; REVOKE DELETE ON database.orders FROM 'app_user'@'%'; ```
1. **System privileges**: CREATE, DROP, ALTER (database-level) 2. **Object privileges**: SELECT, INSERT, UPDATE, DELETE, EXECUTE (table/procedure-level)
In SQL security management, database administrators can grant specific privileges using the `GRANT` statement: - **Data Manipulation Privileges**: `SELECT`, `INSERT`, `UP...
A code injection attack where malicious SQL is inserted via user input. Prevention: 1. **Parameterized queries** (prepared statements) 2. **Input validation** 3. **ORM fr...
A mechanism to prevent concurrent transactions from interfering with each other. Locks can be **shared** (read locks, multiple allowed) or **exclusive** (write locks, onl...
- `COMMIT` — Make changes permanent - `ROLLBACK` — Undo all changes in the transaction - `SAVEPOINT` — Set a partial rollback point ```sql START TRANSACTION; UPDATE accou...
A database transaction that finishes all operations successfully and persists its changes permanently to durable storage is said to be **Committed**: ```sql START TRANSAC...
**`ROLLBACK` does nothing after a `COMMIT` has executed**. ### Why? Once a transaction issues `COMMIT`, the changes are permanently written to the database transaction lo...
The four foundational properties that guarantee database transactions are processed reliably are known as **ACID**: 1. **Atomicity**: "All or nothing." If any statement w...
Every individual statement is automatically committed. In MySQL, autocommit is ON by default. Turn it off for multi-statement transactions: ```sql SET autocommit = 0; -- ...
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.