Skip to content

Instantly share code, notes, and snippets.

@haiueom
Created October 6, 2022 03:05
Show Gist options
  • Save haiueom/c6c98961510fb3c089faf3b36aa3fd89 to your computer and use it in GitHub Desktop.
Save haiueom/c6c98961510fb3c089faf3b36aa3fd89 to your computer and use it in GitHub Desktop.
Tugas Mandiri Materi SQL Pertemuan ke-7 Pesantren PeTIK 2 Jombang YBM PLN

Tugas Mandiri 07

Pengembangan Perangkat Lunak Pesantren PeTIK 2 Jombang

Materi Database SQL Pertemuan ke-7

Nama : Ilham Taufiq
NIM  : 22255601012

Jawaban 1

SELECT CURTIME() AS waktu ;
-- atau bisa juga
SELECT CURRENT_TIME AS waktu ;

Jawaban 2

SELECT CURDATE(), DATEDIFF(CURDATE(), '2022-12-31') AS 'hari-menuju-tahun-baru' ;

Jawaban 3

SELECT LAST_DAY(CURDATE()) AS 'tgl-terakhir-bulan-ini' ;

Jawaban 4

SELECT MONTHNAME(CURDATE()) AS 'nama-bulan-sekarang' ;

Jawaban 5

SELECT CURDATE(), CURRENT_TIMESTAMP() AS 'tanggal_waktu' ;

Jawaban 6

SELECT CURRENT_DATE() AS 'tanggal_hari_ini' ;

Jawaban 7

SELECT SYSDATE() AS 'tanggal_pada_komputer', QUARTER(SYSDATE()) AS 'Sekarang_Quarter' ;

Jawaban 8

SELECT CURDATE() AS 'tanggal_sekarang', WEEKOFMONTH(CURDATE()) AS 'pekan_ke' ;

Jawaban 9

SELECT nama, MONTH(tgl_lahir) FROM db_toko.pelanggan ;

Jawaban 10

SELECT 'Pesantren-Teknologi-Informasi-Dan-Komunikasi' AS PeTIK ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment