C:\jee-2020-092\eclipse>eclipse -clearPersistedState


Entity 쪽 컬럼에 값이 유일해질 수 있도록 컬럼에 @Id 추가

The JPA Id does not always have to match the database table primary key constraint, nor is a primary key or a unique constraint required.

https://en.wikibooks.org/wiki/Java_Persistence/Identity_and_Sequencing#No_Primary_Key


JPA crud

카테고리 없음 2021. 5. 21. 10:08


liunx, . meaning

2021. 5. 12. 18:40

보호되어 있는 글입니다. 내용을 보시려면 비밀번호를 입력하세요.


SELECT 'a' = 'A'; -- 1
SELECT BINARY 'a' = 'A'; -- 0

(dev.mysql.com/doc/refman/5.7/en/cast-functions.html#operator_binary)


linux, date

카테고리 없음 2021. 4. 30. 10:21

date -d '10 hour ago' '+%Y-%m-%d %H'


:g/^$/d


SELECT * FROM BATCH_INFO20 WHERE FIND_IN_SET(DATE_FORMAT(NOW(), '%H'), EXEC_HOURS);

 

(stackoverflow.com/questions/18710921/mysql-find-in-set-with-array-string)


with recursive T as ( select 'a,b,c,d,e,f' as items), N as ( select 1 as n union select n + 1 from N, T where n <= length(items) - length(replace(items, ',', ''))) select distinct substring_index(substring_index(items, ',', n), ',', -1) group_name from N, T

 

(stackoverflow.com/questions/17942508/sql-split-values-to-multiple-rows)