0% found this document useful (0 votes)
11 views3 pages

QUESTION Database

The document describes an assessment with 4 questions. Question 1 asks the student to create a table and insert sample data. Question 2 asks the student to print data from a table based on even/odd IDs. Question 3 asks the student to write a function to remove special characters from a string. Question 4 asks the student to write a procedure to insert a sample string into a table with 3 columns: ID, CATEGORY_ID, SUB_CATEGORY_ID.

Uploaded by

Binayak Padhi
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)
11 views3 pages

QUESTION Database

The document describes an assessment with 4 questions. Question 1 asks the student to create a table and insert sample data. Question 2 asks the student to print data from a table based on even/odd IDs. Question 3 asks the student to write a function to remove special characters from a string. Question 4 asks the student to write a procedure to insert a sample string into a table with 3 columns: ID, CATEGORY_ID, SUB_CATEGORY_ID.

Uploaded by

Binayak Padhi
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/ 3

Assessment on 09/09/2023

Total Marks : 100 Total time 2:00 Hrs

Question 1:

create table data ( city varchar2(10), gender char(1) );


insert into data values ('Delhi','M');
insert into data values ('Delhi','F');
insert into data values ('Delhi','M');
insert into data values ('Delhi','M');
insert into data values ('Pune','F');
insert into data values ('Pune','M');
insert into data values ('Pune','F');
insert into data values ('Pune','F');
insert into data values ('Banglore','F');
insert into data values ('Banglore','F');

Output will be like this

Question 2 :

Print data on the basis of Even/Odd data present in Id Column.

create table data (ID number, value varchar2(20));


insert into data values (1,'A');
insert into data values (2,'B');
insert into data values (3,'C');
insert into data values (4,'D');
insert into data values (5,'E');
insert into data values (6,'F');
insert into data values (7,'G');
insert into data values (8,'H');

OUTPUT WILL BE

Odd alphabet even alphabet


A B
C D
E F
G H

Question 3 :

Write a user defined function to remove all special characters in string.

Input: - ‘ My Country name is India & I love my country @very much!...

Output: – My Country name is India I love my country very much.

Question 4:

Input :
'1#1,2,3,5~2#1,2,3,4~3#44,46~4#58~6#72,75~5#67,68'

Write a Procedure to Insert the above string into a table


in below format?

ID CATEGORY_ID SUB_CATEGORY_ID
1 1 1
2 1 2
3 1 3
4 1 5
5 2 1
6 2 2
7 2 3
8 2 4
9 3 44
10 3 46
11 4 58
12 6 72
13 6 75
14 5 67
15 5 68

You might also like