Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
create view vwOyuncular
as
select adi,Soyadİ from Oyuncular where adi like 'k%'
with check option
insert vwOyuncular (Adi ,Soyadİ ) values ('Kadir','Savun')
insert vwOyuncular (Adi ,Soyadİ ) values ('Sadri','Alışık')
-------------------------------------------------------------------------------------------------------------------------------------------
--FONKSİYONLAR... C# taki metodlar gibi...
--SCALAR FONKSİYON = GERİYE DEĞER DÖDÜRÜR...
CREATE function topla2Int (@s1 int,@s2 int) returns int
as
begin
return @s1+@s2
end
--kullanımı şema adı = 'dbo.' yazmadan çalışmaz !!!
select dbo.topla2Int (5,10) -- tablo olarak sonuç verir çünkü select kullandık
print dbo.topla2Int(50,22) -- mesaj olarak sonuç verir çünkü print kullandık
-------------------------------------------------------------------------------------------------------------------------------------
-----maliyet birim fiyat * stok miktarı +%18
create function maliyethesapla(@a int,@b int) returns int
as
begin
return @a*@b*1.18
end
select dbo.maliyethesapla(4,100)
-------------------------------------------------------------------------------------------------------------------------------------
--İNLİNE FONKSİYONLARI
--geriye değer döndürmez tablo döndürür
-- vies ile uyapılan tüm işlemler fonksiyonlarlada yapılır...
--ınline fonksiyon kullanılırken begin end yapısı kullanılmaz...
create function fnGonder (@ad nvarchar (max),@soyad nvarchar (max)) returns table
as
return select adi,soyadi from personeller where adi=@ad and soyadi=@soyad
select * from dbo.fnGonder ('Robert','King')
--------------------------------------------------------------------------------------------------------------------------------------------------------
örnek
create function fnAlfabetikSıralı (@id int) returns table
as
return
select top 5 * from Urunler where UrunID<=@id order by urunadi
select * from dbo.fnAlfabetikSıralı (20)
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team