NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

if Object_id ('SP_topla') is not null -- tekrar çalıştırdıgında hata vermemsi için siler tekrar yazar
drop procedure SP_topla
go


create proc SP_topla
(
@Sayi1 int,
@Sayi2 int

)
as
begin
declare @Toplam int=(@Sayi1+@Sayi2)
return @Toplam
end

go

-- kullanıcının vermiş oldugu başlangıç ve bitiş degerine göre 1. sutünda o sayı 2. sutünda kareleri 3.sutünde küpleri yaz


if Object_id ('SP_KUPKARE') is not null -- tekrar çalıştırdıgında hata vermemsi için siler tekrar yazar
drop procedure SP_KUPKARE


go
create proc SP_KUPKARE
@baslangic Int,
@bitis Int
AS
Declare @i Int= @baslangic
Declare @Kare Int
Declare @Kup Int
Declare @KupKare Table
(
sayi Int,
Kare Int,
Kup Int
)
while @i<=@bitis
begin
set @i=@i+1
set @Kare=@i*@i
set @Kup=@i*@i*@i
Insert Into @KupKare Values(@i,@Kare, @Kup)
end
select * from @KupKare


-- 1 ile 100 arasında 50 adet rastgele sayı üretin,
-- Bu sayıları bir tablo içinde tutun.
-- daha sonra bu veri seti üzerinde min-max normalleştirme yöntemini kullanın
-- elde edilen sonuçları ilgili sayının yanında bir sutun altında gösterin

if Object_id ('SP_MAXMIN') is not null -- tekrar çalıştırdıgında hata vermemsi için siler tekrar yazar
drop procedure SP_MAXMIN

go
create Proc SP_MAXMIN
as
begin
Declare @i Int=0
Declare @max Int
Declare @min Int
Declare @DataSet table
(
Number Int,
Normal Float
)
while @i<=50
begin
Insert Into @DataSet(Number) values(ROUND((RAND()*100),0))
set @i=@i+1
end
select @max=MAX(Number),@min=MIN(Number) from @DataSet
Update @DataSet set Normal=(Number-@min)/(@max-@min)
select * from @DataSet
end

--------------------------------------------------------------------
/*
1-50 arasındaki sayılardan teklerin toplamını ve çiftlerin toplamını output parametreler ile
geri döndüren SPyi yazın.
*/
if Object_id ('SP_TEKCIFT') is not null -- tekrar çalıştırdıgında hata vermemsi için siler tekrar yazar
drop procedure SP_TEKCIFT

go


create proc SP_TEKCIFT
@TTop int output,
@CTop int output
as
begin
declare @i int=1
while @i<= 50

begin
if @i%2=0
set @CTop=@CTop+@i
else
set @TTop=@TTop+@i
set @i=@i+1
end
end


     
 
what is notes.io
 

Notes.io is a web-based application for 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 12 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

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.