2101
GB
What is the SQL standard CREATE VIEW statement and what properties must hold for a view to be created successfully?
IN
SQL मानक क्रिएट व्यू स्टेटमेंट क्या है और किसी व्यू को सफलतापूर्वक बनाने के लिए कौन से गुण होने चाहिए?
A
Views can be created from any SQL statement
किसी भी SQL कथन से दृश्य बनाए जा सकते हैं
B
Views must always reference at least two base tables
दृश्यों को हमेशा कम से कम दो आधार तालिकाओं का संदर्भ देना चाहिए
C
A view is created from a valid SELECT statement; key requirements vary by DBMS but typically: no ORDER BY in the view definition (without LIMIT/TOP), consistent column names (either from SELECT or via aliases), and the underlying tables/views must exist
एक वैध चयन कथन से एक दृश्य बनाया जाता है; मुख्य आवश्यकताएँ DBMS के अनुसार अलग-अलग होती हैं, लेकिन आम तौर पर: दृश्य परिभाषा में कोई ORDER BY नहीं (बिना LIMIT/TOP), सुसंगत कॉलम नाम (या तो SELECT से या उपनाम के माध्यम से), और अंतर्निहित तालिकाएँ/दृश्य मौजूद होने चाहिए
D
Views can include INSERT UPDATE DELETE statements
दृश्यों में INSERT UPDATE DELETE कथन शामिल हो सकते हैं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
CREATE VIEW view_name AS SELECT col1, col2, expr AS alias FROM table WHERE condition. Requirements: unique column names (use aliases for computed columns or duplicates), no parameters (unlike table-valued functions), underlying tables must exist. ORDER BY in view is allowed only if TOP/LIMIT is used (implementation-specific).
व्याख्या (हिन्दी)
CREATE VIEW view_name AS SELECT col1, col2, expr AS alias FROM table WHERE condition. आवश्यकताएँ: अद्वितीय कॉलम नाम (गणना किए गए कॉलम या डुप्लिकेट के लिए उपनाम का उपयोग करें), कोई पैरामीटर नहीं (तालिका-मूल्यवान फ़ंक्शन के विपरीत), अंतर्निहित तालिकाएं मौजूद होनी चाहिए। ORDER BY in view is allowed only if TOP/LIMIT is used (implementation-specific).