26.06.2025

0

Beğenme

1

Görüntülenme

SQL Kursu Ödev 8

1- test veritabanınızda employee isimli sütun bilgileri id(INTEGER), name VARCHAR(50), birthday DATE, email VARCHAR(100) olan bir tablo oluşturalım.

CREATE TABLE employee(

id INTEGER, 

name VARCHAR(50),

birthday DATE,

email VARCHAR(100)

);


2- Oluşturduğumuz employee tablosuna 'Mockaroo' servisini kullanarak 50 adet veri ekleyelim.

insert into employee (id, name, birthday, email) values (1, 'Konstantin Peatt', '1960-10-30', '[email protected]');

insert into employee (id, name, birthday, email) values (2, 'Caz Gosland', '1990-03-06', '[email protected]');

insert into employee (id, name, birthday, email) values (3, 'Nicoline Scrimshaw', '1986-04-05', '[email protected]');

insert into employee (id, name, birthday, email) values (4, 'Lilah Attaway', '1963-02-09', '[email protected]');

insert into employee (id, name, birthday, email) values (5, 'Vail Petigrew', '1970-07-30', '[email protected]');


3- Sütunların her birine göre diğer sütunları güncelleyecek 5 adet UPDATE işlemi yapalım.

UPDATE employee

SET name = 'NN'

WHERE id = 3;


UPDATE employee

SET birthday = '1999-12-31'

WHERE id = 5;


UPDATE employee

SET email = 'NN'

WHERE id = 7;


UPDATE employee

SET id = 111

WHERE id = 9;


UPDATE employee

SET name = 'NN'

WHERE id = 11;


4- Sütunların her birine göre ilgili satırı silecek 5 adet DELETE işlemi yapalım.

DELETE FROM employee

WHERE id = 10;


DELETE FROM employee

WHERE name = 'Ansley Kahen';


DELETE FROM employee

WHERE birthday = '1982-03-15';


DELETE FROM employee

WHERE email = '[email protected]';


DELETE FROM employee

WHERE id = 20;

SQL

Yorumlar

Kullanıcı yorumlarını görüntüleyebilmek için kayıt olmalısınız!

Şen Ekin

SELECT meaning FROM life WHERE language = 'Python'; | def bio(): return "SQL lover. Python powered."

Konum

DE

© 2021 Patika Dev

facebook
twitter
instagram
youtube
linkedin

Disclaimer: The information /programs / events provided on https://patika.dev and https://risein.com are strictly for upskilling and networking purposes related to the technical infrastructure of blockchain platforms. We do not provide financial or investment advice and do not make any representations regarding the value, profitability, or future price of any blockchain or cryptocurrency. Users are encouraged to conduct their own research and consult with licensed financial professionals before engaging in any investment activities. https://patika.dev and https://risein.com disclaim any responsibility for financial decisions made by users based on information provided here.