Create a function called ami1() that queries and displays the contents of the artist table
/*drop table if already created */
drop table artist;
Create New
create table artist(artistID number(5) primary key,name
varchar(20));
desc artist;
insert into artist values(101,'Viral');
insert into artist values(102,'Rajgor');
insert into artist values(103,'Poonam');
insert into artist values(104,'Navin');
Select * from artist;
Function
CREATE OR REPLACE FUNCTION amit1 RETURN BOOLEAN
IS
BEGIN
dbms_output.put_line('||Artist||Name||');
dbms_output.put_line('_________________');
FOR v_rec IN (SELECT artistID, name FROM artist) LOOP
dbms_output.put_line('||'||v_rec.artistID || '||' ||
v_rec.name||'||');
END LOOP;
RETURN TRUE;
END;
Calling Code
DECLARE
answer BOOLEAN;
BEGIN
answer := amit2();
END;
/
if you still have any Problem regarding this question please comment and if you like my code please appreciate me by thumbs up thank you.........
Create a function called ami1() that queries and displays the contents of the artist table Ï...
Write an SQL query against the Chinook Database v1.4. Each query
must run successfully using DB Browser for SQLite. Create the exact
query below. Must use sub query. I saw that a
similar solution for this question used IF and CONCAT functions
which do not work and return errors. If it is possible to use the
CASE function in place of IF that would be greatly appreciated.
Also I really hate to ask but if it could be organized neatly...