NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

select * from Products

select
P.*,
C.CategoryID,
S.SupplierID

from Products P

inner join Categories C on C.CategoryID=P.CategoryID
inner join Suppliers S on S.SupplierID=P.SupplierID

go
select
E.FirstName,
E.LastName,
O.OrderDate,
S.CompanyName

from Employees E

join Orders O on O.EmployeeID=E.EmployeeID
join Shippers S on S.ShipperID=O.ShipVia

order by E.FirstName

/* Çalışanların tüm siparişinde hangi ürünleri sipariş olarak aldığını ve hangi kargo firmasıyla
gönderdiklerini gösteriniz... */


go
select
E.FirstName,
E.LastName
from Employees E

join Orders O on O.EmployeeID=E.EmployeeID
join [Order Details] OD on OD.OrderID=O.OrderID

join Products P on P.ProductID= OD.ProductID

join Shippers S on S.ShipperID=O.ShipVia

order by LastName

go
select
c.ContactName,
O.OrderDate,
O.ShipCountry,
Od.Quantity,
P.ProductName,
CA.CategoryName,
S.CompanyName

from Customers C

join Orders O on C.CustomerID=O.CustomerID

join [Order Details] Od on Od.OrderID=O.OrderID

join Products P on P.ProductID=Od.ProductID

join Categories CA on CA.CategoryID=P.CategoryID

join Suppliers S on S.SupplierID=P.SupplierID

/* join tabloadı on (suanki tablonun id)baglıyacagımız = (baglanacak diger tablodaki id) */





/* Tüm çalışanlarımın(employes) yapmış oldukları siparişlerin (orders) hangi müşteriler(customers) tarafından verildigini,
ürünlerin hangi kategoride olduklarını, ürünlerin hangi tedarikçi firmadan(supliers) alındıklarını,
bu ürünlerin hangi kargo firması(shippers) ile gönderildikilerini gösteriniz...
*/



select
E.FirstName,
E.LastName,
O.OrderDate,
C.ContactName,
Od.Quantity,
P.ProductName,
CT.CategoryName,
S.CompanyName,
SH.CompanyName 'ShipperCompany'

from Employees E

join orders O on O.EmployeeID=E.EmployeeID
join Customers C on C.CustomerID=O.CustomerID
join [Order Details] Od on Od.OrderID =Od.OrderID
join Products P on P.ProductID=Od.ProductID
join Categories CT on CT.CategoryID=P.CategoryID
join Suppliers S on S.SupplierID=P.SupplierID
join Shippers SH on SH.ShipperID=O.ShipVia





/* (Create View VW_View1 ) view e çalış */
/*
view (gizleme...!!)


create view vw_view1
with encryption
as
select
.
.
.


*/






-- view depolanmış sql sorgularıdır tablo gibi davranır fakat fiziksel tablo degildir.
-- where ifadesi ile yazılabililr
-- ekleme silme güncelleme yapılabilir.
-- o işlemleri yapabilmek için viewde o sorgu olmalıdır..
------------------------------------------------------------------------------------------------

create table ogrenciler
(
id int identity primary key,
ad varchar(50),
soyad varchar(50),
okul varchar(50)


)
go
insert into ogrenciler values('Doğukan','Göktaş',' Ayvansaray')
insert into ogrenciler values('Eren','Sertbaş',' Ayvansaray')
insert into ogrenciler values('Yunus Emre','Altay',' Ayvansaray')
insert into ogrenciler values('Furkan','Çankaya',' Ayvansaray')
insert into ogrenciler values('Kazım ','Kartal',' Ayvansaray')
insert into ogrenciler values('Halil','Eser',' Ayvansaray')

go

create View VW_View5
as
select*
from ogrenciler
where okul='ayvansaray' -- ogrenciler tablosuna ayvansaraydan baska okulda olanları girme ekleme!!!!!!1
with check option -- bu komut ile sınırlandırılıyor.

go

insert into VW_View5 values('Veli','Çınar','ayvansaray')

select* from ogrenciler


     
 
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.