Question 17 of 32beginner🔧 ApplyShort Answer1 mark

As per the preferences of the students four teams were formed as given below. Insert these four rows in TEAM table: Row 1: (1, Team Titan) Row 2: (2, Team Rockers) Row 3: (3, Team Magnet) Row 3: (4, Team Hurricane)

Correct Answer

INSERT INTO TEAM VALUES(1, 'Team Titan'); INSERT INTO TEAM VALUES(2, 'Team Rockers'); INSERT INTO TEAM VALUES(3, 'Team Magnet'); INSERT INTO TEAM VALUES(4, 'Team Hurricane');

Exercise: EXERCISE | Q: 4(e) | (Page 48)
For More Understanding

Explanation

The question requires inserting four rows into the TEAM table. The TEAM table has two columns: TeamID (integer) and TeamName (string). The INSERT INTO statement is used to add rows to a table. Each row is inserted with VALUES clause containing the data in the same order as the columns defined in the table structure. Note that the context shows 'Row 3' twice (a typo), but logically the fourth row should be Row 4 with TeamID 4.

Solution Steps

  1. Step 1: Identify the table name as TEAM and its columns (TeamID, TeamName)

  2. Step 2: Write INSERT INTO statement for each row with VALUES containing TeamID and TeamName

  3. Step 3: Ensure TeamName values are enclosed in single quotes as they are string values