(a) Write a SQL query to create the table PT1. [ 2 Marks]
(b) Write a query to insert new value to the table. [1 Mark] (c) Write a query to update the record of ID=102. [1 Mark
Answers
Answer:
if you want formula to multiply or divide formula is =product(B6:B8)
(a) SQL query to create the table PT1:
CREATE TABLE PT1 (
ID INT PRIMARY KEY,
English INT,
Hindi INT,
Math INT
);
This query creates a new table PT1 with four columns: ID (integer and primary key), English (integer), Hindi (integer), and Math (integer).
(b) SQL query to insert new values to the table PT1:
INSERT INTO PT1 (ID, English, Hindi, Math)
VALUES (101, 60, 60, 70), (102, 60, 70, 80), (103, 48, 87, 69);
This query inserts three new rows into the PT1 table, with the given ID and subject marks.
(c) SQL query to update the record of ID=102:
UPDATE PT1
SET English = 65, Hindi = 75, Math = 85
WHERE ID = 102;
This query updates the row in the PT1 table where the ID is equal to 102, setting the English, Hindi, and Math columns to the new values of 65, 75, and 85 respectively.
To learn more about SQL from the given link.
https://brainly.in/question/10453
#SPJ3