What is the difference between DDL, DML, and DCL in SQL?
Classifies SQL commands into Data Definition, Manipulation, and Control languages.
Why Interviewers Ask This
Basic SQL classification is fundamental. Interviewers check if you can categorize commands correctly and understand their purposes.
How to Answer This Question
Define DDL (structure change), DML (data manipulation), and DCL (permissions). List examples for each like CREATE, SELECT, GRANT. Explain the scope of each language type.
Key Points to Cover
- Structure vs Data vs Security
- Command examples
- Scope of usage
- Language classification
Sample Answer
DDL defines database structure with commands like CREATE and ALTER. DML manipulates data using INSERT, UPDATE, and DELETE. DCL controls access with GRANT and REVOKE. Understanding these categories helps in writing correct and secure SQL queries for different operational needs.
Common Mistakes to Avoid
- Mixing up commands
- Forgetting DCL examples
- Confusing DDL with DQL
Practice This Question with AI
Answer this question orally or via text and get instant AI-powered feedback on your response quality, structure, and delivery.
Related Interview Questions
What is the difference between LIKE and equals operators in SQL?
Easy
TCSWhat is the difference between DELETE and TRUNCATE commands in SQL?
Easy
FlipkartWhat is ER model in the DBMS?
Medium
FlipkartWhat is database normalization and why is it important?
Medium
FlipkartWhat is the difference between authentication and authorization?
Easy
FlipkartHow do you prioritize tasks when multiple deadlines are approaching?
Medium
Flipkart