Soal Praktikum Satu
4. Tampilkan data yang sudah berhasil dimasukkan menggunakan command SELECT.
Ambil screenshotnya dan masukkan ke sebuah dokumen disertai identitas.
Jawaban:
1. Membuat tabel event
mysql> create table event (nama varchar(20) not null,date date,type varchar(15)
not null, remark varchar(255) not null);
Query OK, 0 rows affected (0.42 sec)
2. Memasukan data dengan menggunakan metode insert data
mysql> insert into event values('fluffy','1995-05-15','litter','4 kittens,3 fema
les,1 males');
Query OK, 1 row affected (0.08 sec)
mysql> insert into event values('buffy','1993-06-23','litter','5 puppies,2 femal
es,3 males');
Query OK, 1 row affected (0.37 sec)
mysql> insert into event values('buffy','1994-06-19','litter','3 puppies,3 femal
es');
Query OK, 1 row affected (0.08 sec)
mysql> insert into event values('chirpy','1999-03-21','vet','needed beak straigh
tned');
Query OK, 1 row affected (0.39 sec)
3.Perintah input menggunakan perintah load data
mysql> load data local infile 'd:/raden/data.txt' into table event;
Query OK, 6 rows affected, 6 warnings (0.03 sec)Records: 6 Deleted: 0 Skipped: 0 Warnings: 6
4. Menammpilkan data menggunakan select
0 comments:
Post a Comment