Apexoracle Own Practise Syntax and Errors

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

DAY 1(CREATE TABLE,INSERT INTO )

1)create table student_132

(S_Roll int,

S_Name varchar(225),

S_Email varchar(225)

);

2)insert table student_132(S_Roll,S_Name,S_Email)

values ('001','hira','hira@gnmail.com');

values ('002','fida','fida@gnmail.com');

values ('003','mou','mou@gnmail.com');

values ('004','mira','mira@gnmail.com');

3)insert into MIS(Roll,Blood,Email,Section)

values (042,'B+','j@gmail.com','B')

4) insert into student_ISRAT_132(Roll,Name,Address)

values(11,'X','MIS');

5) create table DRAFT_OF_LECTURE_SCM

Topics varchar(225),

efficiency varchar(225),

cost varchar(225),

responsiveness varchar(225)

);

6) INSERT INTO DRAFT_OF_LECTURE_SCM(Topic, efficiency, cost, Responsiveness)

VALUES ('Firm in efficient frontier', '+', '-', '-');


7) INSERT INTO EMPLOYEE ("ID", "employee name", "city", "Salary")

VALUES (38032, 'cat', 'dog', 20000);


DAY 2 (SELECT ,update,

1)

Step 1

CREATE TABLE Customer

customer_id int,

name character (20),

age int,

country character(35)

Step2

insert into Customer(customer_id,name,age,country)

values(3251,'Susan',42, 'United states');


values(3252,'Bruno',58, 'Brazil');

values(3253,'Katherine',29, 'Brazil');

step 3

select country,customer_id

from Customer;

output of select command

2) select Roll,Name

from student_ISRAT_132;

3) select Roll,Blood

from MIS;
4) SELECT S_Email

from student_132;

4)

update Customer

set age='22'

where age='42';
5)

update student_ISRAT_132

set Address='management information systems'

where Address='MIS';

6)UPDATE MIS

SET Email='israt@gmail.com'

where Email='m@gmail.com';
7) update student_132

set S_Email='buttercup@gmail.com'

where S_Email='mou@gmail.com';

1)DELETE SYNTAX

delete FROM DRAFT_OF_LECTURE_SCM

2) delete from student_132

where S_Email='mira@gmail.com';
3) delete from MIS

where Email='j@gmail.com';

4) delete from customer

where country='Brazil';

You might also like