हिंदी

code snippet. CREATE TABLE student( name CHAR(30) student_id INT, gender CHAR(1), PRIMARY KEY (student_id) ); In the following query how many rows will be deleted? DELETE student WHERE student_id=109;

Advertisements
Advertisements

प्रश्न

Choose the appropriate answer with respect to the following code snippet.

code snippet.
CREATE TABLE student(
name CHAR(30)
student_id INT,
gender CHAR(1),
PRIMARY KEY (student_id)
);

In the following query how many rows will be deleted? 

DELETE student
WHERE student_id=109;

विकल्प

  • 1 row

  • All the rows where student ID is equal to 109

  • No row will be deleted

  • 2 rows

MCQ
Advertisements

उत्तर

1 row

Explanation:

student_id is a PRIMARY KEY, so each ID is unique. Therefore, only 1 row with student_id = 109 will be deleted.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 8: Introduction to Structured Query Language (SQL) - Exercise [पृष्ठ १७०]

APPEARS IN

एनसीईआरटी Informatics Practices [English] Class 11
अध्याय 8 Introduction to Structured Query Language (SQL)
Exercise | Q 2. e) | पृष्ठ १७०
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×