Difference between Authentication and Authorization? (Auth verifies identity, e.g., login; Authorization checks permissions, e.g., role-based access. What is JWT? (JSON Web Token: Stateless token with header, payload, signature for secure API auth in MERN apps.) How to secure passwords? (Hash with bcrypt/Argon2, add salt, enforce strong rules, rate-limit logins.) at’s the difference between DELETE, TRUNCATE, and DROP? (DELETE removes rows conditionally; TRUNCATE deletes all without logging; DROP removes the table structure.) Write a query to find the second highest salary: SELECT MAX(salary) FROM Employee WHERE salary < (SELECT MAX(salary) FROM Employee); How do you find duplicates? SELECT column, COUNT(*) FROM table GROUP BY column HAVING COUNT(*) > 1; Common Authentication Questions Difference between Authentication and Authorization? (Auth verifies identity, e.g., login; Authorization checks permissions, e.g., role-based access.) What is JWT? (JSON Web Token: Stateless token with header, payload, signature for secure API auth in MERN apps.) How to secure passwords? (Hash with bcrypt/Argon2, add salt, enforce strong rules, rate-limit logins.) Practice Tips Use GROUP BY with aggregates: SELECT dept, AVG(salary) FROM Employee GROUP BY dept; for department averages. For joins: Practice INNER, LEFT, SELF joins on employee-manager tables. Implement OAuth2 in Spring Boot or Node.js for microservices, tying to your cloud certs. Related Common SQL queries for user authentication systems How to store passwords securely in a database Designing tables for users sessions and tokens SQL queries to verify email and activate accounts Preventing SQL injection in authentication queries
Check out your Company Bowl for anonymous work chats.