1501 Question 1501 EN + हिं Medium GB What is a correlated subquery in SQL and how does it differ from a non-correlated subquery? IN SQL में सहसंबंधित सबक्वेरी क्या है और यह गैर-सहसंबद्ध सबक्वेरी से कैसे भिन्न है? A A subquery inside the FROM clause FROM क्लॉज के अंदर एक सबक्वेरी B A subquery that references another subquery एक सबक्वेरी जो किसी अन्य सबक्वेरी का संदर्भ देती है C A subquery using the IN operator IN ऑपरेटर का उपयोग करने वाली एक सबक्वेरी D A subquery that references a column from the outer query causing it to be executed once for each row of the outer query (vs. non-correlated subquery which executes once independently) एक सबक्वेरी जो बाहरी क्वेरी से एक कॉलम को संदर्भित करती है जिसके कारण इसे बाहरी क्वेरी की प्रत्येक पंक्ति के लिए एक बार निष्पादित किया जाता है (बनाम गैर-सहसंबद्ध सबक्वेरी जो एक बार स्वतंत्र रूप से निष्पादित होती है) ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Correlated subquery: references outer query columns (e.g., WHERE salary > (SELECT AVG(salary) FROM emp e2 WHERE e2.dept = e1.dept)). Executes once per outer row - potentially O(n) executions. Non-correlated: executes once, result used for all outer rows. व्याख्या (हिन्दी) सहसंबंधित सबक्वेरी: बाहरी क्वेरी कॉलम का संदर्भ देता है (उदाहरण के लिए, जहां वेतन > (एएमपी ई2 से औसत (वेतन) चुनें जहां ई2.डिप्ट = ई1.डिप्ट))। प्रति बाहरी पंक्ति एक बार निष्पादित होती है - संभावित रूप से O(n) निष्पादन। गैर-सहसंबद्ध: एक बार निष्पादित होता है, परिणाम सभी बाहरी पंक्तियों के लिए उपयोग किया जाता है। 🎯 Exam Perspective DBMS से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is three-valued logic (3VL) in SQL and what are th... What is the OVER(PARTITION BY...ORDER BY...ROWS/RANGE B... What is the SQL EXISTS operator and when should it be p... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1502 Question 1502 EN + हिं Easy GB What is the SQL EXISTS operator and when should it be preferred over IN? IN SQL EXISTS ऑपरेटर क्या है और इसे IN की तुलना में कब प्राथमिकता दी जानी चाहिए? A IN is always preferred over EXISTS IN को हमेशा EXISTS से अधिक प्राथमिकता दी जाती है B EXISTS only works with correlated subqueries EXISTS केवल सहसंबद्ध उपश्रेणियों के साथ काम करता है C EXISTS is identical to IN EXISTS IN के समान है D EXISTS returns TRUE if a subquery returns at least one row (stops at first match), preferred over IN when the subquery could return NULLs (IN with NULL has counterintuitive behavior) or when checking existence is more efficient यदि कोई सबक्वेरी कम से कम एक पंक्ति लौटाती है (पहले मिलान पर रुक जाती है) तो EXISTS सत्य लौटाता है, जब सबक्वेरी NULL लौटा सकती है (IN के साथ NULL में प्रति-सहज ज्ञान युक्त व्यवहार होता है) या जब अस्तित्व की जाँच करना अधिक कुशल होता है, तो IN की तुलना में इसे प्राथमिकता दी जाती है। ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) EXISTS: short-circuits on first match (efficient). IN: fetches all matching values. Critical difference: IN with NULL values - x NOT IN (1, NULL) is always FALSE/UNKNOWN. EXISTS handles NULLs correctly. EXISTS often preferred for large subquery result sets. व्याख्या (हिन्दी) अस्तित्व: पहले मैच में शॉर्ट-सर्किट (कुशल)। IN: सभी मिलान मान प्राप्त करता है। गंभीर अंतर: शून्य मानों के साथ IN - x NOT IN (1, शून्य) हमेशा गलत/अज्ञात होता है। EXISTS NULL को सही ढंग से संभालता है। EXISTS को अक्सर बड़े सबक्वेरी परिणाम सेटों के लिए प्राथमिकता दी जाती है। 🎯 Exam Perspective SSC, Railway, Banking और State PCS जैसी परीक्षाओं में DBMS से सवाल अक्सर पूछे जाते हैं — difficulty level "Easy"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is three-valued logic (3VL) in SQL and what are th... What is the OVER(PARTITION BY...ORDER BY...ROWS/RANGE B... What does SELECT * FROM employees WHERE department_id I... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1503 Question 1503 EN + हिं Easy GB What does SELECT * FROM employees WHERE department_id IN (SELECT department_id FROM departments WHERE location = NULL) return? IN SELECT * FROM Workers WHERE Department_id IN (SELECT Department_id FROM Departments WHERE Location = NULL) क्या लौटाता है? A A syntax error एक सिंटैक्स त्रुटि B All employees regardless of department विभाग की परवाह किए बिना सभी कर्मचारी C An empty result set - the condition WHERE location = NULL is always FALSE (must use IS NULL instead of = NULL) एक खाली परिणाम सेट - वह स्थिति जहां स्थान = NULL हमेशा गलत होता है (= NULL के बजाय IS NULL का उपयोग करना चाहिए) D All employees in departments with NULL location शून्य स्थान वाले विभागों के सभी कर्मचारी ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) WHERE location = NULL always evaluates to UNKNOWN (NULL = anything = UNKNOWN in SQL three-valued logic). The correct syntax is WHERE location IS NULL. This is a common SQL mistake - always use IS NULL / IS NOT NULL when checking for NULL values. व्याख्या (हिन्दी) जहां स्थान = NULL हमेशा अज्ञात का मूल्यांकन करता है (NULL = कुछ भी = SQL तीन-मूल्य वाले तर्क में अज्ञात)। सही सिंटैक्स वह है जहां स्थान शून्य है। यह एक सामान्य SQL गलती है - NULL मानों की जाँच करते समय हमेशा IS NULL / IS NOT NULL का उपयोग करें। 🎯 Exam Perspective अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो DBMS का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Easy"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the difference between TRUNCATE and DELETE with... What is the COALESCE(expr1, expr2, ..., exprN) function... What is the SQL EXISTS operator and when should it be p... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1504 Question 1504 EN + हिं Medium GB What is the difference between RANK(), DENSE_RANK(), and ROW_NUMBER() window functions? IN RANK(), DENSE_RANK(), और ROW_NUMBER() विंडो फ़ंक्शंस के बीच क्या अंतर है? A RANK() never has ties; DENSE_RANK() always has ties RANK() का कभी संबंध नहीं होता; DENSE_RANK() में हमेशा संबंध होते हैं B They are all identical वे सभी एक जैसे हैं C ROW_NUMBER() cannot be used with ORDER BY ROW_NUMBER() का उपयोग ORDER BY के साथ नहीं किया जा सकता D ROW_NUMBER(): unique sequential number with no gaps or ties; RANK(): same rank for ties then skips numbers (1,1,3); DENSE_RANK(): same rank for ties no gaps (1,1,2) ROW_NUMBER(): बिना किसी अंतराल या संबंध के अद्वितीय अनुक्रमिक संख्या; रैंक(): संबंधों के लिए समान रैंक फिर संख्याओं को छोड़ देता है (1,1,3); DENSE_RANK(): टाई के लिए समान रैंक, कोई अंतराल नहीं (1,1,2) ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Example with values (100,100,90): ROW_NUMBER() = 1,2,3 (unique, arbitrary tie-breaking). RANK() = 1,1,3 (ties get same rank, next rank skips). DENSE_RANK() = 1,1,2 (ties get same rank, next rank is consecutive, no gaps). व्याख्या (हिन्दी) मानों के साथ उदाहरण (100,100,90): ROW_NUMBER() = 1,2,3 (अद्वितीय, मनमाना टाई-ब्रेकिंग)। रैंक() = 1,1,3 (संबंधों को समान रैंक मिलती है, अगली रैंक छूट जाती है)। DENSE_RANK() = 1,1,2 (संबंधों को समान रैंक मिलती है, अगली रैंक लगातार होती है, कोई अंतराल नहीं)। 🎯 Exam Perspective DBMS के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the difference between TRUNCATE and DELETE with... What is the SQL EXISTS operator and when should it be p... What does the SQL FETCH FIRST n ROWS ONLY clause do and... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1505 Question 1505 EN + हिं Medium GB What are LEAD() and LAG() window functions used for? IN LEAD() और LAG() विंडो फ़ंक्शंस का उपयोग किसके लिए किया जाता है? A Pivoting rows into columns पंक्तियों को स्तंभों में पिवोट करना B Accessing values from subsequent rows (LEAD) or preceding rows (LAG) within the result partition useful for computing differences between consecutive rows without self-joins परिणाम विभाजन के भीतर बाद की पंक्तियों (LEAD) या पूर्ववर्ती पंक्तियों (LAG) से मूल्यों तक पहुँचना, स्व-जुड़ने के बिना लगातार पंक्तियों के बीच अंतर की गणना के लिए उपयोगी है। C Computing running totals चल रहे कुल योग की गणना करना D Ranking rows within partitions विभाजनों के भीतर पंक्तियों की रैंकिंग ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) LAG(col, n, default): accesses value from n rows BEFORE current row in window. LEAD(col, n, default): accesses value from n rows AFTER current row. Useful for: calculating period-over-period changes (sales this month vs. last month), detecting consecutive events, computing row differences. व्याख्या (हिन्दी) LAG(col, n, default): विंडो में वर्तमान पंक्ति से पहले n पंक्तियों से मान तक पहुँचता है। लीड (कॉल, एन, डिफ़ॉल्ट): वर्तमान पंक्ति के बाद एन पंक्तियों से मूल्य तक पहुँचता है। इसके लिए उपयोगी: समय-दर-समय परिवर्तनों की गणना करना (इस महीने बनाम पिछले महीने की बिक्री), लगातार घटनाओं का पता लगाना, पंक्ति अंतर की गणना करना। 🎯 Exam Perspective यह सवाल DBMS category का है — difficulty level "Medium", और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is the SQL PIVOT operation conceptually and how is... What is the COALESCE(expr1, expr2, ..., exprN) function... In SQL what does DISTINCT do when used inside an aggreg... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1506 Question 1506 EN + हिं Medium GB What is the OVER(PARTITION BY...ORDER BY...ROWS/RANGE BETWEEN...) clause used for? IN ओवर(पार्टीशन बाय...ऑर्डर बाय...रोज़/रेंज बिटवीन...) क्लॉज का उपयोग किसके लिए किया जाता है? A Defining the window frame for window functions - specifying which rows to include in each computation relative to the current row विंडो फ़ंक्शंस के लिए विंडो फ़्रेम को परिभाषित करना - निर्दिष्ट करना कि वर्तमान पंक्ति के सापेक्ष प्रत्येक गणना में कौन सी पंक्तियों को शामिल किया जाए B Creating partitioned tables विभाजित तालिकाएँ बनाना C Creating table partitions for query optimization क्वेरी अनुकूलन के लिए तालिका विभाजन बनाना D Partitioning data across physical storage भौतिक भंडारण में डेटा का विभाजन ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) OVER clause defines the window for window functions: PARTITION BY groups rows into partitions (like GROUP BY but without collapsing). ORDER BY defines row ordering within partition. ROWS/RANGE BETWEEN defines the frame (e.g., ROWS BETWEEN 2 PRECEDING AND CURRENT ROW for 3-row rolling average). व्याख्या (हिन्दी) ओवर क्लॉज विंडो फ़ंक्शंस के लिए विंडो को परिभाषित करता है: विभाजन पंक्तियों को विभाजन में समूहित करता है (जैसे ग्रुप बाय लेकिन बिना ढहे)। ORDER BY विभाजन के भीतर पंक्ति क्रम को परिभाषित करता है। बीच की पंक्तियाँ/श्रेणी फ्रेम को परिभाषित करती है (उदाहरण के लिए, 3-पंक्ति रोलिंग औसत के लिए 2 पूर्ववर्ती और वर्तमान पंक्ति के बीच की पंक्तियाँ)। 🎯 Exam Perspective यह प्रश्न DBMS की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the SQL PIVOT operation conceptually and how is... What is the purpose of SQL CHECK constraint and what ar... What are LEAD() and LAG() window functions used for? 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1507 Question 1507 EN + हिं Medium GB What is the SQL PIVOT operation conceptually and how is it typically implemented? IN वैचारिक रूप से SQL PIVOT ऑपरेशन क्या है और इसे आम तौर पर कैसे कार्यान्वित किया जाता है? A An operation that removes duplicate rows एक ऑपरेशन जो डुप्लिकेट पंक्तियों को हटा देता है B A type of JOIN operation एक प्रकार का जॉइन ऑपरेशन C Transforming row values into column headers converting a narrow table into a wide table - implemented via conditional aggregation (CASE + GROUP BY) in standard SQL पंक्ति मानों को कॉलम हेडर में बदलना, एक संकीर्ण तालिका को एक विस्तृत तालिका में परिवर्तित करना - मानक SQL में सशर्त एकत्रीकरण (CASE + GROUP BY) के माध्यम से कार्यान्वित किया गया D Rotating a table 90 degrees on screen स्क्रीन पर टेबल को 90 डिग्री घुमाना ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) PIVOT transforms rows to columns. Standard SQL: SELECT id, SUM(CASE WHEN month=Jan THEN sales END) AS Jan, SUM(CASE WHEN month=Feb THEN sales END) AS Feb ... Some DBMS (SQL Server, Oracle) have native PIVOT syntax. Opposite is UNPIVOT. व्याख्या (हिन्दी) PIVOT पंक्तियों को स्तंभों में परिवर्तित करता है। मानक एसक्यूएल: चयन आईडी, एसयूएम (मामला जब महीना = जनवरी तब बिक्री समाप्त होती है) जनवरी के रूप में, एसयूएम (मामला जब महीना = फरवरी तब बिक्री समाप्त होती है) फरवरी के रूप में ... कुछ डीबीएमएस (एसक्यूएल सर्वर, ओरेकल) में मूल पिवट सिंटैक्स होता है। इसके विपरीत UNPIVOT है। 🎯 Exam Perspective DBMS से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the SQL MERGE statement (also called UPSERT) us... What is the SQL EXISTS operator and when should it be p... In SQL what does DISTINCT do when used inside an aggreg... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1508 Question 1508 EN + हिं Easy GB What is the COALESCE(expr1, expr2, ..., exprN) function? IN COALESCE(expr1, expr2, ..., exprN) फ़ंक्शन क्या है? A Returns NULL if any expression is NULL यदि कोई अभिव्यक्ति शून्य है तो शून्य लौटाता है B Returns the first non-NULL expression from left to right - short-circuits (stops evaluating) once a non-NULL value is found बाएँ से दाएँ पहली गैर-शून्य अभिव्यक्ति लौटाता है - एक गैर-शून्य मान पाए जाने पर शॉर्ट-सर्किट (मूल्यांकन करना बंद कर देता है) C Returns all non-NULL values as a list सभी गैर-शून्य मानों को एक सूची के रूप में लौटाता है D Returns the maximum non-NULL value from the expressions भावों से अधिकतम गैर-शून्य मान लौटाता है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) COALESCE(e1,e2,...,en): evaluates expressions left to right, returns first non-NULL. Short-circuits. COALESCE(NULL, NULL, 5, NULL) = 5. Common uses: default values for NULLs, fallback values. Equivalent to nested CASE WHEN e1 IS NOT NULL THEN e1 WHEN e2 IS NOT NULL THEN e2... व्याख्या (हिन्दी) COALESCE(e1,e2,...,en): बाएं से दाएं भावों का मूल्यांकन करता है, पहले गैर-शून्य लौटाता है। शॉर्ट सर्किट। COALESCE(NULL, NULL, 5, NULL) = 5. सामान्य उपयोग: NULL के लिए डिफ़ॉल्ट मान, फ़ॉलबैक मान। नेस्टेड केस के समतुल्य जब e1 शून्य नहीं है तब e1 जब e2 शून्य नहीं है तब e2... 🎯 Exam Perspective UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में DBMS से सवाल अक्सर पूछे जाते हैं — difficulty level "Easy"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What does SELECT DISTINCT department_id FROM employees... What are LEAD() and LAG() window functions used for? What is the SQL EXISTS operator and when should it be p... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1509 Question 1509 EN + हिं Easy GB What does the SQL FETCH FIRST n ROWS ONLY clause do and which standard introduced it? IN SQL FETCH FIRST n ROWS ONLY क्लॉज क्या करता है और किस मानक ने इसे पेश किया? A It fetches the first n rows from a specific table यह एक विशिष्ट तालिका से पहली n पंक्तियाँ प्राप्त करता है B It creates a cursor for the first n rows यह पहली n पंक्तियों के लिए एक कर्सर बनाता है C It creates an index on the first n rows यह पहली n पंक्तियों पर एक सूचकांक बनाता है D It limits the result set to the first n rows (equivalent to LIMIT n in MySQL/PostgreSQL), introduced by SQL:2008 standard यह SQL:2008 मानक द्वारा प्रस्तुत परिणाम सेट को पहली n पंक्तियों (MySQL/PostgreSQL में LIMIT n के बराबर) तक सीमित करता है। ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) FETCH FIRST n ROWS ONLY is ANSI SQL:2008 standard syntax for row limiting. MySQL/PostgreSQL: LIMIT n. SQL Server: TOP n or FETCH FIRST. Oracle: ROWNUM, FETCH FIRST. Often combined with OFFSET for pagination: OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY. व्याख्या (हिन्दी) FETCH FIRST n RoWS केवल पंक्ति सीमित करने के लिए ANSI SQL:2008 मानक सिंटैक्स है। MySQL/PostgreSQL: सीमा n. एसक्यूएल सर्वर: टॉप एन या फ़ेच फर्स्ट। ओरेकल: राउनम, पहले प्राप्त करें। पेजिनेशन के लिए इसे अक्सर OFFSET के साथ जोड़ा जाता है: OFFSET 10 पंक्तियाँ केवल अगली 10 पंक्तियाँ प्राप्त करें। 🎯 Exam Perspective अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो DBMS का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Easy"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What does SELECT * FROM employees WHERE department_id I... What is the SQL PIVOT operation conceptually and how is... What does SELECT DISTINCT department_id FROM employees... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1510 Question 1510 EN + हिं Medium GB What is the SQL MERGE statement (also called UPSERT) used for? IN SQL MERGE स्टेटमेंट (जिसे UPSERT भी कहा जाता है) का उपयोग किसके लिए किया जाता है? A Merging the results of two SELECT queries दो SELECT क्वेरीज़ के परिणामों को मर्ज करना B Merging two databases into one दो डेटाबेस को एक में विलय करना C Combining two tables into one permanent table दो तालिकाओं को एक स्थायी तालिका में संयोजित करना D Performing INSERT, UPDATE, or DELETE operations in a single statement based on whether a match exists between source and target tables - useful for ETL and synchronization operations स्रोत और लक्ष्य तालिकाओं के बीच मिलान मौजूद है या नहीं, इसके आधार पर एकल कथन में INSERT, UPDATE, या DELETE संचालन करना - ETL और सिंक्रनाइज़ेशन संचालन के लिए उपयोगी ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) MERGE (SQL:2003): MERGE INTO target USING source ON condition WHEN MATCHED THEN UPDATE... WHEN NOT MATCHED THEN INSERT... Atomic upsert operation - one statement handles both insert-if-new and update-if-exists. Common in ETL pipelines. व्याख्या (हिन्दी) मर्ज (एसक्यूएल: 2003): शर्त पर स्रोत का उपयोग करके लक्ष्य में मर्ज करें जब मिलान हो तो अपडेट करें... जब मेल नहीं खाता है तो डालें... परमाणु अप्सर्ट ऑपरेशन - एक स्टेटमेंट इन्सर्ट-इफ-न्यू और अपडेट-इफ-मौजूद दोनों को संभालता है। ईटीएल पाइपलाइनों में आम। 🎯 Exam Perspective DBMS के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is three-valued logic (3VL) in SQL and what are th... What does SELECT * FROM employees WHERE department_id I... What is a correlated subquery in SQL and how does it di... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1511 Question 1511 EN + हिं Easy GB What is three-valued logic (3VL) in SQL and what are the three truth values? IN SQL में थ्री-वैल्यू लॉजिक (3VL) क्या है और तीन सत्य मान क्या हैं? A TRUE, FALSE, and UNKNOWN - where UNKNOWN results from comparisons involving NULL values; logical operations follow specific rules: TRUE AND UNKNOWN = UNKNOWN, FALSE AND UNKNOWN = FALSE, TRUE OR UNKNOWN = TRUE सत्य, असत्य और अज्ञात - जहां अज्ञात का परिणाम शून्य मानों वाली तुलनाओं से होता है; तार्किक संचालन विशिष्ट नियमों का पालन करते हैं: सत्य और अज्ञात = अज्ञात, गलत और अज्ञात = गलत, सत्य या अज्ञात = सत्य B TRUE, FALSE, and NULL - where NULL is treated as a third Boolean value सत्य, असत्य और शून्य - जहां शून्य को तीसरे बूलियन मान के रूप में माना जाता है C TRUE and FALSE only (SQL uses standard Boolean logic) केवल सत्य और असत्य (एसक्यूएल मानक बूलियन तर्क का उपयोग करता है) D TRUE, FALSE, and ERROR - where ERROR results from type mismatches सत्य, असत्य और त्रुटि - जहां प्रकार के बेमेल होने से त्रुटि उत्पन्न होती है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) SQL 3VL: comparisons with NULL produce UNKNOWN. Logic rules: UNKNOWN AND TRUE = UNKNOWN, UNKNOWN AND FALSE = FALSE, UNKNOWN OR TRUE = TRUE, UNKNOWN OR FALSE = UNKNOWN, NOT UNKNOWN = UNKNOWN. WHERE clause only passes rows where condition = TRUE. व्याख्या (हिन्दी) SQL 3VL: NULL के साथ तुलना अज्ञात उत्पन्न करती है। तर्क नियम: अज्ञात और सत्य = अज्ञात, अज्ञात और असत्य = असत्य, अज्ञात या सत्य = सत्य, अज्ञात या असत्य = अज्ञात, अज्ञात नहीं = अज्ञात। जहां क्लॉज केवल उन पंक्तियों को पास करता है जहां शर्त = सत्य है। 🎯 Exam Perspective यह सवाल DBMS category का है — difficulty level "Easy", और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is the COALESCE(expr1, expr2, ..., exprN) function... What is the OVER(PARTITION BY...ORDER BY...ROWS/RANGE B... What is the SQL EXISTS operator and when should it be p... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1512 Question 1512 EN + हिं Medium GB What is the difference between TRUNCATE and DELETE without a WHERE clause in SQL? IN SQL में WHERE क्लॉज के बिना TRUNCATE और DELETE के बीच क्या अंतर है? A TRUNCATE removes all rows without logging individual row deletions (faster, minimal logging, resets auto-increment), cannot be rolled back in some DBMS, and cannot have triggers. DELETE logs each row deletion (slower, fully transactional, triggers fire, can be rolled back) TRUNCATE व्यक्तिगत पंक्ति विलोपन को लॉग किए बिना सभी पंक्तियों को हटा देता है (तेज, न्यूनतम लॉगिंग, ऑटो-वृद्धि को रीसेट करता है), कुछ DBMS में वापस नहीं लाया जा सकता है, और इसमें ट्रिगर नहीं हो सकते हैं। प्रत्येक पंक्ति को हटाने के लिए लॉग को हटाएं (धीमा, पूरी तरह से लेन-देन, आग को ट्रिगर करता है, वापस लाया जा सकता है) B TRUNCATE can have a WHERE clause; DELETE cannot TRUNCATE में WHERE क्लॉज हो सकता है; हटा नहीं सकते C They are identical operations वे समान परिचालन हैं D DELETE is faster than TRUNCATE for large tables बड़ी तालिकाओं के लिए DELETE TRUNCATE से तेज़ है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) TRUNCATE: DDL operation in many DBMS, removes all rows by deallocating data pages, minimal logging, very fast, resets identity/auto-increment, cannot have WHERE clause, does not fire row-level triggers, may not be rollbackable. DELETE: DML, logs each deletion, fires triggers, can have WHERE, fully rollbackable. व्याख्या (हिन्दी) ट्रंकेट: कई डीबीएमएस में डीडीएल ऑपरेशन, डेटा पेजों को हटाकर सभी पंक्तियों को हटा देता है, न्यूनतम लॉगिंग, बहुत तेज, पहचान/ऑटो-वृद्धि को रीसेट करता है, WHERE क्लॉज नहीं हो सकता है, पंक्ति-स्तरीय ट्रिगर सक्रिय नहीं होता है, रोलबैक करने योग्य नहीं हो सकता है। हटाएं: डीएमएल, प्रत्येक विलोपन को लॉग करता है, ट्रिगर सक्रिय करता है, WHERE कर सकता है, पूरी तरह से रोलबैक करने योग्य। 🎯 Exam Perspective यह प्रश्न DBMS की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What are LEAD() and LAG() window functions used for? What is the SQL EXISTS operator and when should it be p... In SQL what does DISTINCT do when used inside an aggreg... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1513 Question 1513 EN + हिं Easy GB In SQL what does DISTINCT do when used inside an aggregate function like COUNT(DISTINCT column)? IN SQL में COUNT(DISTINCT कॉलम) जैसे समग्र फ़ंक्शन के अंदर उपयोग किए जाने पर DISTINCT क्या करता है? A It is identical to COUNT(column) without DISTINCT यह DISTINCT के बिना COUNT(कॉलम) के समान है B It filters out rows where column is NULL यह उन पंक्तियों को फ़िल्टर करता है जहां कॉलम शून्य है C It orders the count results यह गणना परिणामों का आदेश देता है D It counts only unique non-NULL values of the column eliminating duplicates before counting - e.g. COUNT(DISTINCT dept_id) counts how many distinct departments have employees यह गिनती से पहले डुप्लिकेट को हटाकर कॉलम के केवल अद्वितीय गैर-शून्य मानों की गणना करता है - उदाहरण के लिए COUNT(DISTINCT dept_id) गिनता है कि कितने अलग-अलग विभागों में कर्मचारी हैं ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) COUNT(DISTINCT col): counts only distinct (unique) non-NULL values of col. Different from COUNT(col) which counts all non-NULL values including duplicates. Also works with SUM, AVG: SUM(DISTINCT salary) sums only unique salary values. व्याख्या (हिन्दी) COUNT(DISTINCT col): कॉलम के केवल विशिष्ट (अद्वितीय) गैर-शून्य मानों की गणना करता है। COUNT(col) से भिन्न जो डुप्लिकेट सहित सभी गैर-शून्य मानों की गणना करता है। SUM, AVG के साथ भी काम करता है: SUM (DISTINCT वेतन) केवल अद्वितीय वेतन मानों का योग करता है। 🎯 Exam Perspective DBMS से जुड़ा यह सवाल — difficulty level "Easy" उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the difference between RANK(), DENSE_RANK(), an... What does SELECT * FROM employees WHERE department_id I... What does the SQL FETCH FIRST n ROWS ONLY clause do and... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1514 Question 1514 EN + हिं Medium GB What is the purpose of SQL CHECK constraint and what are its limitations? IN SQL CHECK बाधा का उद्देश्य क्या है और इसकी सीमाएँ क्या हैं? A To enforce a condition that must be true for all rows in a table; limitations include: cannot reference other tables, cannot contain subqueries in standard SQL, and in some DBMS it was parsed but not enforced ऐसी शर्त लागू करने के लिए जो तालिका की सभी पंक्तियों के लिए सत्य होनी चाहिए; सीमाओं में शामिल हैं: अन्य तालिकाओं को संदर्भित नहीं किया जा सकता है, मानक SQL में उप-क्वेरीज़ शामिल नहीं हो सकती हैं, और कुछ DBMS में इसे पार्स किया गया था लेकिन लागू नहीं किया गया था B To verify query syntax before execution निष्पादन से पहले क्वेरी सिंटैक्स को सत्यापित करने के लिए C To check for NULL values in columns कॉलम में NULL मानों की जाँच करने के लिए D To verify that a user has proper permissions यह सत्यापित करने के लिए कि उपयोगकर्ता के पास उचित अनुमतियाँ हैं ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) CHECK constraint: enforces a predicate on column values (e.g., CHECK(salary > 0), CHECK(end_date > start_date)). Standard SQL limitations: cannot reference other tables or use subqueries in most DBMS. MySQL silently ignored CHECK before 8.0.16. व्याख्या (हिन्दी) जांच बाधा: कॉलम मानों पर एक विधेय लागू करता है (उदाहरण के लिए, जांच (वेतन > 0), जांच (अंत_तिथि > प्रारंभ_तिथि))। मानक SQL सीमाएँ: अधिकांश DBMS में अन्य तालिकाओं का संदर्भ नहीं दिया जा सकता या सबक्वेरीज़ का उपयोग नहीं किया जा सकता। MySQL ने 8.0.16 से पहले चुपचाप CHECK को नजरअंदाज कर दिया। 🎯 Exam Perspective SSC, Railway, Banking और State PCS जैसी परीक्षाओं में DBMS से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What does SELECT DISTINCT department_id FROM employees... What is the difference between TRUNCATE and DELETE with... In SQL what does DISTINCT do when used inside an aggreg... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)
1515 Question 1515 EN + हिं Easy GB What does SELECT DISTINCT department_id FROM employees return differently from SELECT department_id FROM employees GROUP BY department_id? IN SELECT DISTINCT Department_id FROM Employee, SELECT Department_id FROM Employee GROUP BY Department_id से अलग क्या लौटाता है? A They are semantically equivalent - both return unique department IDs वे शब्दार्थ की दृष्टि से समतुल्य हैं - दोनों अद्वितीय विभाग आईडी लौटाते हैं B DISTINCT returns unique values without aggregation capability; GROUP BY allows adding aggregate functions. However, for just listing unique values with no aggregation, they produce identical results - GROUP BY is more powerful but DISTINCT is cleaner for simple deduplication DISTINCT एकत्रीकरण क्षमता के बिना अद्वितीय मान लौटाता है; ग्रुप बाय समग्र कार्यों को जोड़ने की अनुमति देता है। हालाँकि, बिना किसी एकत्रीकरण के केवल अद्वितीय मानों को सूचीबद्ध करने के लिए, वे समान परिणाम देते हैं - GROUP BY अधिक शक्तिशाली है लेकिन DISTINCT सरल डिडुप्लीकेशन के लिए क्लीनर है C GROUP BY cannot be used without aggregate functions ग्रुप बाय का उपयोग समग्र कार्यों के बिना नहीं किया जा सकता है D DISTINCT is faster than GROUP BY in all cases DISTINCT सभी मामलों में ग्रुप BY से तेज़ है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) For simple deduplication: SELECT DISTINCT col and SELECT col GROUP BY col produce identical results. But GROUP BY allows: SELECT dept, COUNT(*), AVG(salary) GROUP BY dept. DISTINCT with aggregates works differently. Internally, both may use sorting or hashing for deduplication. व्याख्या (हिन्दी) सरल डिडुप्लीकेशन के लिए: SELECT DISTINCT col और SELECT col GROUP BY col समान परिणाम उत्पन्न करते हैं। लेकिन ग्रुप बाय अनुमति देता है: विभाग अनुसार चयन करें, गिनती(*), औसत(वेतन) ग्रुप बाय विभाग। समुच्चय के साथ DISTINCT अलग तरीके से काम करता है। आंतरिक रूप से, दोनों डिडुप्लीकेशन के लिए सॉर्टिंग या हैशिंग का उपयोग कर सकते हैं। 🎯 Exam Perspective अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो DBMS का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Easy"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the SQL EXISTS operator and when should it be p... What is the difference between RANK(), DENSE_RANK(), an... What is the COALESCE(expr1, expr2, ..., exprN) function... 📚 Related Topic Introduction to DBMS (639) Database Architecture (135) Data Models (138)