Skip to content
Snippets Groups Projects
Commit a2732b6e authored by aishwarya's avatar aishwarya
Browse files

Queries changes added

parent 683bde90
Branches
No related tags found
No related merge requests found
src/main/java/org/example/Queries/Screenshots/img.png

199 KiB

INSERT COMMAND:
insert into employee(id,name,age,salary)values(101,'Rohan',24,54600);
insert into employee(id,name,age,salary)values(102,'Aishwarya',24,54600);
insert into employee(id,name,age,salary)values(103,'Archana',24,54600);
insert into employee(id,name,age,salary)values(104,'Vidya',24,54600);
select * from employee
id | name | age | salary
-----+-----------+-----+--------
101 | Rohan | 20 | 50000
102 | Aishwarya | 21 | 75000
103 | Archana | 25 | 45000
104 | Vidya | 24 | 54600
(4 rows)
UPDATE Command:
update employee set name='Vidhu' where id=104;
select * from employee
id | name | age | salary
-----+-----------+-----+--------
101 | Rohan | 20 | 50000
102 | Aishwarya | 21 | 75000
103 | Archana | 25 | 45000
104 | Vidhu | 24 | 54600
(4 rows)
SELECT Command:
rohan=> select id,name from employee where salary>47000;
id | name
-----+-----------
101 | Rohan
102 | Aishwarya
104 | Vidhu
(3 rows)
DELETE Command:
delete from employee where age=23;
select * from employee
;
id | name | age | salary
-----+-----------+-----+--------
101 | Rohan | 20 | 50000
102 | Aishwarya | 21 | 75000
103 | Archana | 25 | 45000
(3 rows)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment