GB
What is the difference between DROP TABLE and TRUNCATE TABLE?
IN
ड्रॉप टेबल और ट्रंकेट टेबल के बीच क्या अंतर है?
A
TRUNCATE TABLE removes the table structure; DROP TABLE only removes data
TRUNCATE TABLE तालिका संरचना को हटा देता है; ड्रॉप टेबल केवल डेटा हटाता है
B
DROP TABLE is DDL - removes the table structure, all data, indexes, triggers, and constraints permanently; TRUNCATE TABLE is DDL in most DBMS - removes all data but preserves the table structure, indexes, and column definitions
ड्रॉप टेबल डीडीएल है - टेबल संरचना, सभी डेटा, इंडेक्स, ट्रिगर और बाधाओं को स्थायी रूप से हटा देता है; ट्रंकेट टेबल अधिकांश डीबीएमएस में डीडीएल है - सभी डेटा को हटा देता है लेकिन टेबल संरचना, इंडेक्स और कॉलम परिभाषाओं को संरक्षित करता है
C
They are functionally identical DDL operations
वे कार्यात्मक रूप से समान डीडीएल ऑपरेशन हैं
D
Both are DML operations
दोनों डीएमएल ऑपरेशन हैं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
DROP TABLE: removes everything - table, all data, indexes, triggers, constraints, dependencies. Cannot be reversed after commit. TRUNCATE: removes all rows (fastest, minimal logging), preserves table structure/indexes/constraints. TRUNCATE cannot have WHERE clause.
व्याख्या (हिन्दी)
ड्रॉप टेबल: सब कुछ हटा देता है - टेबल, सभी डेटा, इंडेक्स, ट्रिगर, बाधाएं, निर्भरताएं। प्रतिबद्धता के बाद उलटा नहीं किया जा सकता. ट्रंकेट: सभी पंक्तियों को हटाता है (सबसे तेज़, न्यूनतम लॉगिंग), तालिका संरचना/अनुक्रमणिका/बाधाओं को संरक्षित करता है। TRUNCATE में WHERE क्लॉज नहीं हो सकता।