Deepanjan

an anonymous user · June 11, 2021 · SQL
CREATE TABLE students (
  rollno INTEGER PRIMARY KEY,
  name char NOT NULL,
  year INTEGER NOT NULL
  branch char,
  course char
);
-- insert some values
INSERT INTO students VALUES (1, 'Ryan', 2019,'MSE''Maths');
INSERT INTO students VALUES (2, 'Amit', 'CSE','computer science');
INSERT INTO students VALUES (3, 'sayan', 'PHY','physical science');

CREATE TABLE Address(
    St_id INTEGER foreign key,
    Addres char not NULL,
    Marks INTEGER );
INSERT INTO Address VALUES (458,'Konnagarh',78);
INSERT INTO Address VALUES (598,'Serampore',88);
INSERT INTO Address VALUES (252,'Konnagarh',80);
CREATE TABLE Dpt(
    Branch char not NULL,
    HOD char );
INSERT INTO Dpt VALUES ('CSE','Pradyut');
INSERT INTO Dpt VALUES ('PHY','SPS');
INSERT INTO Dpt VALUES ('MSE','G.P.');
Select * from Dpt;

Comments

Please sign up or log in to contribute to the discussion.