0% found this document useful (0 votes)
6 views1 page

Python

Uploaded by

YASH XXXX
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Python

Uploaded by

YASH XXXX
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

-- create

CREATE TABLE EMPLOYEE (

empId INTEGER PRIMARY KEY,

firstname varchar(20) NOT NULL,

LastName varchar(20),

salary INT,

city text

);

-- insert

INSERT INTO EMPLOYEE VALUES (0001, 'Travis', 'Kelce', 68000, 'Chandigarh');

INSERT INTO EMPLOYEE VALUES (0002, 'Rebeka', 'Nolan', 70000, 'Kota');

INSERT INTO EMPLOYEE VALUES (0003, 'Avamax', 'Sharma', 3047878, 'Dholakpur');

-- fetch

SELECT * FROM EMPLOYEE;

insert INTO EMPLOYEE VALUES (0013, 'Pradeep', 'Sharma', 3047872, 'Daman');

SELECT * FROM EMPLOYEE;

update EMPLOYEE set city="Amsterdam" where city ="Dholakpur"

SELECT * FROM EMPLOYEE;

delete from EMPLOYEE where salary<70000;

SELECT * FROM EMPLOYEE;

ALTER TABLE EMPLOYEE ADD COLUM majors varchar(20);

SELECT * FROM EMPLOYEE;

You might also like