Upload files to "/"
This commit is contained in:
commit
999ed4d7c3
1 changed files with 48 additions and 0 deletions
48
data.txt
Normal file
48
data.txt
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
MySQL -u root -p
|
||||||
|
|
||||||
|
show databases;
|
||||||
|
|
||||||
|
use namadatabase;
|
||||||
|
|
||||||
|
describe tabelyangdimau;
|
||||||
|
|
||||||
|
create database namadatabase;
|
||||||
|
|
||||||
|
create table namatabel (
|
||||||
|
namarownya int auto_increment primary key,
|
||||||
|
namarow varchar(20) not null
|
||||||
|
);
|
||||||
|
|
||||||
|
insert into namatabel (namarownya, namarow, tahun)
|
||||||
|
values
|
||||||
|
('164231049', 'budianto', 2023),
|
||||||
|
('164231040', 'budianti', 2023);
|
||||||
|
|
||||||
|
|
||||||
|
select * from namatabel; (* semua artinya)
|
||||||
|
|
||||||
|
select * from namatbel where tahun = 2023
|
||||||
|
|
||||||
|
select nama, nim from mahasiswa;
|
||||||
|
|
||||||
|
select nama, nim from mahasiswa where angkatan = 2023;
|
||||||
|
|
||||||
|
create or replace database namadatabase;
|
||||||
|
|
||||||
|
create table guru_pengajar (
|
||||||
|
-> nig int,
|
||||||
|
-> namaguru varchar(20) not null,
|
||||||
|
->
|
||||||
|
-> foreign key (nig) references guru (nig);
|
||||||
|
|
||||||
|
CREATE TABLE dept (
|
||||||
|
deptno SMALLINT NOT NULL AUTO_INCREMENT,
|
||||||
|
deptname VARCHAR(36) NOT NULL,
|
||||||
|
mgrno CHAR(6),
|
||||||
|
location CHAR(30),
|
||||||
|
PRIMARY KEY (deptno) -- Tambahkan baris ini
|
||||||
|
) AUTO_INCREMENT = 500;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in a new issue