English

code snippet. CREATE TABLE student( name CHAR(30) student_id INT, gender CHAR(1), PRIMARY KEY (student_id) ); What is true about the following SQL statement? SelecT * fROM student;

Advertisements
Advertisements

Question

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)
);

What is true about the following SQL statement?
SelecT * fROM student;

Options

  • Displays contents of table ‘student’

  • Displays column names and contents of table ‘student’

  • Results in error as improper case has been used

  • Displays only the column names of table ‘student’

MCQ
Advertisements

Solution

Displays contents of table ‘student’

Explanation:

SQL keywords are generally case-insensitive, so SelecT * fROM student; is valid and displays all records and columns of the student table.

shaalaa.com
  Is there an error in this question or solution?
Chapter 8: Introduction to Structured Query Language (SQL) - Exercise [Page 170]

APPEARS IN

NCERT Informatics Practices [English] Class 11
Chapter 8 Introduction to Structured Query Language (SQL)
Exercise | Q 2. c) | Page 170
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×