NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

select * from Gorev
select * from Gorevli

select * from Gorev inner join Gorevli on Gorev.GorevID=Gorevli.GorevID

select * from Gorev left join Gorevli on Gorev.GorevID=Gorevli.GorevID/* left dediğimizde sağda boş olanları gösterir.*/

select * from Gorev right join Gorevli on Gorev.GorevID=Gorevli.GorevID/*right dediğimizde solda boş olanları gösterir*/

select * from Gorev full join Gorevli on Gorev.GorevID=Gorevli.GorevID /*iki tarafda boş olanları gösterir*/




--------------------------------------------------------------------------------

select BolgeID, bolgetanimi,
case
when bolgetanimi='eastern' then 'dogu bolgesi'
when bolgetanimi='western' then 'bati bolgesi'
when bolgetanimi='northern' then 'kuzey bolgesi'
when bolgetanimi='southern' then 'guney bolgesi'
end as[bolge adi]
from Bolge
/*select case yapisi secme islemi yapıyor.Tablo döndürür.*/

select * from Bolge

------------------------------------------------------------------------
ilk önce new queryde create database kurum yazıp calıstırıyoruz sonra kurumu calıstırıyoruz.


declare @isim varchar(10);
select @isim=Gorevli.Isim
from Gorevli where Gorevli.CalisanID=1
print 'ilgili kişi = '+@isim

----------------------------------------------Alttaki kod görevli tablosunu komple gösterir

select * from Gorevli
=====================================================alttaki kod eğer görevli tablosunda
calisanId'si 3 olan bir değer varsa çıktıları verir


if exists (select * from Gorevli where Gorevli.CalisanID=3)
begin
print 'id degeri 3 olan kayıt mevcut'
end
else
print 'id değeri 3 olan kayıt yok'

------------------------------------------------
declare @satirsayisi int
select @satirsayisi=COUNT(*)
from Gorevli;
if @satirsayisi>0
begin
print 'satır sayısı '
+CAST (@satirsayisi as varchar)+' dir'
end else print 'kayıt yoktur'
----------------------------------------------
declare @nakliyeciID int
declare @adet int
select @adet=COUNT (*)
from Satislar where
(CAST(Satislar.NakliyeUcreti as int)>100)

if(@adet>0)
begin
select @nakliyeciID=Satislar.ShipVia
from Satislar
where Satislar.NakliyeUcreti>100
select * from Nakliyeciler
inner join Satislar on
Nakliyeciler.NakliyeciID=Satislar.ShipVia
and Nakliyeciler.NakliyeciID
=@nakliyeciID
and Satislar.NakliyeUcreti>100
end else print 'veri yok'
---------------------------------------------
=============================================
select * from Gorevli where GorevID=16
select * from Gorev
--------------------------------------------

select Gorevli.Isim,GorevIsim
from Gorevli inner join Gorev on
Gorevli.GorevID=Gorev.GorevID

-------------------------------------------
create trigger tgorevsil on Gorev
instead of delete
as
begin
delete from Gorevli
from Gorevli g join deleted d
on t.gorevID=d.GorevID
delete from Gorev
from Gorevli t join deleted d on
t.GorevID=d.GorevID
select * from Gorev
select * from Gorevli
end

delete from Gorev where GorevID=12
     
 
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.