KnowledgeBoat Logo

Informatics Practices

Consider the attributes ( RollNumber, SName, SDateofBirth, GUID ) of the table Student. According to you, which of the following options is the correct representation of the table after executing the following query?

Insert Into Student (RollNumber, SName, SDateofBirth) 
Values(2, 'Sudha', '2002-02-28') ;

1.

RollNumberSNameSDateofBirthGUID
1Atharv2003-05-1512354899
2Sudha2002-02-28NULL

2.

RollNumberSNameSDateofBirthGUID
1Atharv2003-05-1512354899
2Sudha2002-02-2800000000

3.

RollNumberSNameSDateofBirthGUID
1Atharv2003-05-1512354899
2Sudha2002-02-280

4.

RollNumberSNameSDateofBirthGUID
1Atharv2003-05-1512354899
2Sudha2002-02-28

Relational Database

2 Likes

Answer

RollNumberSNameSDateofBirthGUID
1Atharv2003-05-1512354899
2Sudha2002-02-28NULL

Reason — In the above code, a new row is inserted into the 'Student' table, values are provided for RollNumber, SName, and SDateofBirth, but not for GUID. Since GUID is not specified, it will take on its default value, which may be NULL if no default value is defined for the column.

Answered By

3 Likes


Related Questions