Articles Comments

{ Berbagi, Menulis, Dan Mengajar } Ilmu… » 7. Operating System » Query MYQL – DELETE DATA

Query MYQL – DELETE DATA

USE dbHotelWismaKarya;
SELECT * FROM db_checkout_hotel
WHERE waktu_checkout LIKE ‘2015-11%';
———

Untuk Melihat data yang akan kita pilih


USE dbHotelWismaKarya;
SELECT * FROM db_checkout_hotel WHERE waktu_checkout NOT LIKE ‘2015-11%’
AND waktu_checkout LIKE ‘2015-10%’ AND waktu_checkout LIKE ‘2015-19%';

——–

*. Untuk mendelete Data yang ditentukan

USE dbHotelWismaKarya;

DELETEĀ  FROM db_detail_reservasi WHERE checkin_date NOT LIKE ‘2015-11%’
AND checkin_date NOT LIKE ‘2015-10%’ AND checkin_date NOT LIKE ‘2015-09%';

Filed under: 7. Operating System

Leave a Reply

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>