NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

use IO_B_ECZANE

select *from Ilaclar
insert into Ilaclar (Barkod,IlacAdi) values (8888,'Levortiron 50 mg')
select COUNT(Barkod) from Ilaclar
select COUNT(Miktar) from Ilaclar
select COUNT(*) from Ilaclar
select distinct(IlacAdi) from Ilaclar
select distinct(Miktar) from Ilaclar
select ISNULL(Miktar,9999) from Ilaclar -- tabloda kalıcı değişiklik yapmaz.
select coalesce(Miktar,9999) from Ilaclar -- isnull ile aynı çalışır
select nullif(Miktar,500) from Ilaclar -- belirtilen değerleri NULL olarak listeler

select GETDATE() --sistemin güncel tarihini verir
select datepart(day,RTarih) from Receteler
select RTarih, DATEPART(week,Rtarih) from Receteler -- yılın kaçıncı haftası
select RTarih, DATEPART(month,Rtarih) from Receteler -- haftanın kaçıncı günü (başlangıç pazar)

select RTarih, DATEPART(month,Rtarih) from Receteler
select RTarih, DATEPART(year,Rtarih) from Receteler
select RTarih, DATEPART(QUARTER,Rtarih) from Receteler --yılın kaçıncı çeyreğinde olduğu bilgisini verir

select *from Calisanlar
-- personain kaç yıldır çalıştığını veren sorguyu yazınız
select AdSoyad , DATEPART(year, getdate())-DATEPART(year,IGTarihi) as 'Çalıştığı yıl' from Calisanlar
select * from Receteler where 2=DATEPART(weekday,RTarih)
select adsoyad, DATEDIFF(YEAR,IGTarihi,getdate()) from Calisanlar --kaç yıldır çalıştığını verir

--sayı yuvarlama fonkları
--celling: yukarı yuvarlar
--floor: aşağı yuvarlar
--round: belirttiği kadar küsürat bırakır

select *from Receteler
select tutar, FLOOR(tutar)as 'floor', CEILING(tutar)as 'ceılıng', ROUND(tutar,1) as 'round' from Receteler

--replace: değer değiştirmeye yarar. Tabloda kalıcı değişiklik yapmaz
select *from Musteriler
select Adres, REPLACE(Adres, 'adres1','Kastamonu')+REPLACE(Adres, 'adres2','urfa') from Musteriler

select Adres, REPLACE(Replace(Adres,'Adres 2','Urfa'),'Adres1','Kastamonu') from Musteriler

-- reverse Komutu: ifadeyi terster yazdırır
select Adres, REVERSE(Adres) from Musteriler

--left,right,substring
select Adsoyad, LEFT(Adsoyad,3), Right(Adsoyad,3), SUBSTRING(Adsoyad,3,4) from Calisanlar

-- len fonk: alandaki değerin uzunluğunu verir. boşlujklarıda da dahil eder
select Adsoyad, LEN(adsoyad) from Calisanlar
select Adsoyad, CHARINDEX('a',adsoyad) from Calisanlar
select UPPER(AdSoyad), LOWER(AdSoyad) from Calisanlar

select *from Ilaclar
select IlacAdi, Miktar*Fiyat as 'tutar' from Ilaclar
select Fiyat+YasGrup from Ilaclar
select CAST(fiyat as nvarchar)+YasGrup from Ilaclar
--cast: veri tip donusumu yapar
--convert: " " " " " "

select *from Musteriler
select




     
 
what is notes.io
 

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

     
 
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.