Вопрос 10 Написать SQL-код, реализующий процедуру на выборку.
set term !!;
create procedure p1 (a int, b int)
returns (aa int, bb int)
as begin
for select a_p, b_p from tab1
where a_p=:a and b-p=:b
into : aa, : bb
do suspend
end !!
set term; !!
set term !!;
create procedure p1 (a int, b int)
returns (aa int, bb int)
as begin
for select a_p, b_p from tab1
where a_p=:a and b-p=:b
into : aa, : bb
do suspend
end !!
set term; !!
create table custcity (
city char,
snum integer
)
create view citymatch (custcity, salecity)
as select distinct a.city, b.city
from customers a, salespeople b)
create view londoncust
as select * from costomers
create table name (
e1 varchar,
e2 char,
select e1*3 from name
where e2=text
create table ssp (
snum integer,
2 char not null)
create table customers (
snum integer,
2 char,
city char)
select * from ssp
where snum=5
(select snum
from customers
where citi=’(San(Jose’);
)
© Проект «Студенты-Программеры»., 2008. Все права защищены.
Перепечатка материалов только при наличии активной ссылки на источник.
Powered by WordPress