SQLize
Online
/
PHPize Online
/
SQLtest Online
A
A
A
Share
Donate
Blog
Popular
Donate
A
A
A
Share
Blog
Popular
SQLize.online is a free online SQL environment for quickly running, experimenting with and sharing code.
You can run your SQL code on top of the most popular RDBMS including MySQL, MariaDB, SQLite, PostgreSQL, Oracle and Microsoft SQL Server.
SQL code:
Upload
Copy
Format
Clear
-- Veritabanı oluşturulması CREATE DATABASE KutuphaneSistemi; USE KutuphaneSistemi; -- Kitaplar Tablosu CREATE TABLE Kitaplar ( kitap_id SERIAL PRIMARY KEY, kitap_adi VARCHAR(255) NOT NULL, yazar VARCHAR(255) NOT NULL, yayim_yili INT NOT NULL, tur VARCHAR(100) NOT NULL ); -- Uyeler Tablosu CREATE TABLE Uyeler ( uye_id SERIAL PRIMARY KEY, ad VARCHAR(255) NOT NULL, soyad VARCHAR(255) NOT NULL, email VARCHAR(255) UNIQUE, telefon VARCHAR(15) ); -- OduncAlinanKitaplar Tablosu CREATE TABLE OduncAlinanKitaplar ( odunc_id SERIAL PRIMARY KEY, kitap_id INT NOT NULL, uye_id INT NOT NULL, odunc_tarihi DATE NOT NULL, iade_tarihi DATE, FOREIGN KEY (kitap_id) REFERENCES Kitaplar(kitap_id), FOREIGN KEY (uye_id) REFERENCES Uyeler(uye_id) ); -- Veri Ekleme INSERT INTO Kitaplar (kitap_adi, yazar, yayim_yili, tur) VALUES ('Simyaci', 'Paulo Coelho', 1988, 'Roman'), ('Dönüşüm', 'Franz Kafka', 1915, 'Roman'), ('Sefiller', 'Victor Hugo', 1862, 'Roman'); INSERT INTO Uyeler (ad, soyad, email, telefon) VALUES ('Ahmet', 'Yilmaz', 'ahmet@example.com', '5551234567'), ('Ayşe', 'Demir', 'ayse@example.com', '5559876543'); INSERT INTO OduncAlinanKitaplar (kitap_id, uye_id, odunc_tarihi, iade_tarihi) VALUES (1, 1, '2024-01-15', NULL), (2, 2, '2024-01-10', '2024-01-20'); -- Veri Güncelleme Örnekleri UPDATE Kitaplar SET tur = 'Klasik Roman' WHERE kitap_id = 1; UPDATE Uyeler SET telefon = '5559998888' WHERE uye_id = 1; -- Veri Silme Örnekleri DELETE FROM Kitaplar WHERE kitap_id = 3; -- Veri Getirme Örnekleri SELECT * FROM Kitaplar; SELECT * FROM Uyeler; SELECT Uyeler.ad, Uyeler.soyad, Kitaplar.kitap_adi FROM OduncAlinanKitaplar JOIN Uyeler ON OduncAlinanKitaplar.uye_id = Uyeler.uye_id JOIN Kitaplar ON OduncAlinanKitaplar.kitap_id = Kitaplar.kitap_id; -- İleri Seviye Sorgular SELECT tur, COUNT(*) AS kitap_sayisi FROM Kitaplar GROUP BY tur; SELECT uye_id, COUNT(*) AS kitap_sayisi FROM OduncAlinanKitaplar GROUP BY uye_id HAVING COUNT(*) > 1; SELECT * FROM Kitaplar WHERE yayim_yili = (SELECT MIN(yayim_yili) FROM Kitaplar); ; show status like 'Last_query_cost';
SQL
Server:
MariaDB 11.4
MariaDB 11.5
MariaDB 10
MariaDB 10 Sakila (ReadOnly)
MySQL 5.7
MySQL 5.7 Sakila (ReadOnly)
MySQL 8.0
MySQL 8.0 Sakila (ReadOnly)
SQLite 3
SQLite 3 Preloaded
PostgreSQL 10 Bookings (ReadOnly)
PostgreSQL 11
PostgreSQL 12
PostgreSQL 13
PostgreSQL 14
PostgreSQL 15
MS SQL Server 2017
MS SQL Server 2019
MS SQL Server 2022
MS SQL Server 2022 AdventureWorks (ReadOnly)
Firebird 4.0
Firebird 4.0 (Employee)
Oracle Database 19c (HR)
Oracle Database 21c
Oracle Database 23c Free
SOQOL
Version
ER Diagram
Preserve result
Stuck with a problem?
Got Error?
Ask ChatGPT!
Result:
Copy
Clear