카테고리SQL

SQL-date

select시 날짜가 제데로 안나올 경우 DATE_FORMAT(bs.date_stored, ‘%Y-%m-%d’) 날자만 비교 SELECT * FROM `orderbook` WHERE date(date_order)

더보기

Mysql VIEW

CREATE VIEW view_orderbooklist AS SELECT ol.seqno AS seqno, ol.order_no AS order_no, ol.cid AS cid, ol.isbn AS isbn, ol.seller_no AS seller_no, ol.norm_pub AS norm_pub, ol.series_no AS series_no, ol.status AS status, ol.list_price AS list_price, ol.dc_rate AS dc_rate, ol.sell_price AS sell_price, ol.buy_price AS buy_price, ol.order_count AS order_count, ol.work_seqno AS work_seqno, ol.order_seqno AS order_seqno, ...

더보기

SQL-JOIN

JOIN SELECT IFNULL(SUM(ol.list_price),0) list_price, IFNULL(SUM(ol.sell_price),0) sell_price, IFNULL(SUM(ol.buy_price),0) buy_price, IFNULL(SUM(ol.order_count),0) order_count, ob.* FROM orderbook AS ob LEFT OUTER JOIN orderbooklist AS ol ON ob.order_no=ol.order_no WHERE buyer_name LIKE ‘%7%’ OR ob.order_no = ‘7’

더보기

This is a unique website which will require a more modern browser to work!

Please upgrade today!