SQL Primary Key
11.What will happen?
CREATE TABLE team (
team_id INT,
team_name VARCHAR(30),
PRIMARY KEY (team_id, team_name)
);
INSERT INTO team VALUES (1, 'India');
INSERT INTO team VALUES (1, 'India');
-
A. Both rows inserted
-
B. Error due to composite PRIMARY KEY violation
-
C. team_name gets updated
-
D. No effect
Error due to composite PRIMARY KEY violation
Error due to composite PRIMARY KEY violation