SQL | MCQs

    Q1: SQL stands for ________.

    ایس کیو ایل کیا کہلاتا ہے؟
    • A. sequence query language
    • B. None
    • C. structured query language
    • D. structured query logo

    Q2: Table in database must Have ?

    ڈیٹا بیس میں ٹیبل میں کیا ہونا ضروری ہے؟
    • A. Numeric key
    • B. Function Key
    • C. Primary Key
    • D. None

    Q3: Which of the following is correct SQL query to get records of clerks from EMP table?

    ایم پی ٹیبل سے کلرکوں کے ریکارڈ حاصل کرنے کے لئے مندرجہ ذیل میں سے کون سا صحیح ایس کیو ایل استفسار ہے؟
    • A. SELECT ALL FROM EMP WHERE Job = 'Clerk';
    • B. SELECT * FROM EMP WHERE Job == 'Clerk';
    • C. SELECT * FROM EMP WHERE Job = 'Clerk';
    • D. None of these
    • A. DISPLAY * FROM STUDENT;
    • B. None of these
    • C. SELECT * FROM STUDENT;
    • D. SELECT ALL FROM STUDENT;

    Q5: In order to create tables, storing, retrieving or updating data in a database the specific language used is _____?

    کسی ڈیٹا بیس میں ڈیٹا کو ذخیرہ کرنے ، بازیافت کرنے یا اپ ڈیٹ کرنے کے لئے مخصوص زبان استعمال کی گئی ہے؟
    • A. Any high level language
    • B. None of these
    • C. Structured Query Language
    • D. Pascal

    Q6: What Cascade Delete option is used for?

    کیسکیڈ ڈیلیٹ آپشن کس کے لیے استعمال ہوتا ہے؟
    • A. It repeats the recent delete operation to all the records of current table
    • B. It is used to delete all the records of tables in a database
    • C. None of these
    • D. It ensures that all the related records will be deleted from parent table is deleted

    Q7: The SQL command used to retrieve data from a database table is?

    ڈیٹا بیس ٹیبل سے ڈیٹا حاصل کرنے کے لیے ایس کیو ایل کمانڈ کا استعمال کیا جاتا ہے؟
    • A. SELECT
    • B. RETRIEVE
    • C. FETCH
    • D. None of these
    • A. None of these
    • B. INNER JOIN
    • C. LEFT JOIN
    • D. OUTER JOIN

    Q9: How communication is established with MySQL?

    مائی ایس کیو ایل کے ساتھ رابطہ کیسے قائم ہوتا ہے؟
    • A. APIs
    • B. Network calls
    • C. A programming language like C++
    • D. SQL

    Q10: What SQL command can be used to delete columns from a table?

    ٹیبل سے کالم حذف کرنے کے لیے کون سی ایس کیو ایل کمانڈ استعمال کی جا سکتی ہے؟
    • A. ALTER TABLE TableName DROP ColumnName
    • B. MODIFY TABLE TableName DROP ColumnName
    • C. ALTER TABLE TableName DROP COLUMN ColumnName
    • D. MODIFY TABLE TableName DROP COLUMN ColumnName
✅ Correct: 0 | ❌ Wrong: 0 | 📊 Total Attempted: 0