use sinavTakipDB
go
exec dbo.spOgrenciEkle 'Ayşe','YILMAZ',2,'10.10.1990','Adana'
create procedure spOgrencileriGoster
as
begin
select * from ogrencilerTbl
end
go
exec spOgrencileriGoster
alter procedure spOgrenciGuncelle
(
@id int,
@isim varChar(50)
)
as
begin
set nocount on
update ogrencilerTbl
set
isim=@isim
where id=@id
end
go
exec spOgrenciGuncelle 1,'Emrah'
update ogrencilerTbl
set
isim='Emrah'
where id=1
alter procedure spOgrenciSil
(
@id int
)
as
begin
*************************************************
inner join kullanımı
use sinavTakipDB
go
select o.isim,o.soyisim,n.notu from notlarTbl n inner join ogrencilerTbl o on o.id=n.ogrenciID and o.isim='Emrah'
Hiç yorum yok:
Yorum Gönder