SQL – SUBQUERY (AltSorgu)

Subquery sorgu içerisinde sorgu demektir. İçteki alt sorgu problemin bir kısmının çözümünü verir, kalan kısmını ana sorgu halleder.İkiye ayrılır. 1)Basic SubqueryAna sorgudan bağımsız alt sorgulardırEğer subquery tek bir yanıt döndürüyorsa where içerisinde '=' ile kullanılabilir.Eğer subquery bir kolonda birden fazla değer dönüyorsa where içerisinde 'in' ile kulanılabilir.Eğer tablo dönüyorsa bu alt sorguya bir tablo adı... Okumaya Devam et →

SQL – Order By Kullanımı

Ascending (Asc) ArtanDescending (Desc) Azalan select ProductID,ProductName,SupplierID,CategoryID,UnitPrice,UnitsInStock,UnitsOnOrder,ReorderLevel from Products order by UnitsInStock --UnitsInStock şekl sıralarsak (default artan) select ProductID,ProductName,SupplierID,CategoryID,UnitPrice,UnitsInStock,UnitsOnOrder,ReorderLevel from Products order by SupplierID --SuplierID şekl sıralarsak select ProductID,ProductName,SupplierID,CategoryID,UnitPrice,UnitsInStock,UnitsOnOrder,ReorderLevel from Products order by SupplierID,CategoryID --Önce SupplierID'i sıralar sonra CategoryID'de, SuplierID'si ortak olanları sıralar select ProductID,ProductName,SupplierID,CategoryID,UnitPrice,UnitsInStock,UnitsOnOrder,ReorderLevel from Products order by SupplierID desc,CategoryID --Önce SupplierID'i sıralar (desc... Okumaya Devam et →

WordPress.com'da bir web sitesi veya blog oluşturun

Yukarı ↑

WordPress.com ile böyle bir site tasarlayın
Başlayın