To Perform various data manipulation commands, aggregate functions and sorting
concept on all created tables in previous tutorial.
Queries
List total deposit from deposit.
- select sum(amount)from deposit_gtu;
List total loan from karolbagh branch
- select sum(amount) from deposit_gtu where bname='Andheri';
Give maximum loan from branch vrce.
- select max(amount) from borrow_gtu where bname='VRCE';
Count total number of customers.
- select count(cname) from customers;
Count total number of customer’s cities.
- select count(DISTINCT city) from customers;
Create table supplier from employee with all the columns.
- create table supplier as select * from employee;
Create table sup1 from employee with first two columns.
- create table sup1 as (select * from employee WHERE EMP_NO<103 );
Create table sup2 from employee with no data.
- create table sup2 as select * from employee WHERE 1=2;
Insert the data into sup2 from employee whose second character should be ‘n’
and string should be 5 characters long in employee name field.
- INSERT INTO sup2 SELECT * FROM employee where emp_name like '_n___';
Delete all the rows from sup1.
Delete the detail of supplier whose sup_no is 103.
- delete from supplier where emp_no=103;
Related Posts:
DBMS Tutorial-1
CREATE TABLE DEPOSIT (ACTNO VARCHAR2(5),CNAME VARCHAR2(18),BNAME VARCHAR2(18),AMOUNT NUMBER(8,2),ADATE DATE);
INSERT INTO DEPOSIT VALUES('&ACTNO','&CNAME','&BNAME','&AMOUNT… Read More
DBMS Tutorial-2
create table Job ( job_id varchar2 (15), job_title varchar2 (30) , min_sal number (7,2) , max_sal number (7,2));
insert into Job values('&job_id','&job_title','&min_sal','&… Read More
DBMS Tutorial-3
To Perform various data manipulation commands, aggregate functions and sorting
concept on all created tables in previous tutorial.
Queries
List total deposit from deposit.… Read More
Ossum
ReplyDeleteSuperb....
ReplyDelete