手動修改資料如下
先在Data Output上點到想修改的data, 直接修改
然後改完之後在上方有一個資料表箭頭向下的button
點選這個它就會把你修改的部分儲存下來
序號歸零可以使用以下語法
TRUNCATE TABLE doctor_detail RESTART IDENTITY;
參考
https://stackoverflow.com/questions/5342440/reset-auto-increment-counter-in-postgres
手動修改資料如下
先在Data Output上點到想修改的data, 直接修改
然後改完之後在上方有一個資料表箭頭向下的button
點選這個它就會把你修改的部分儲存下來
序號歸零可以使用以下語法
TRUNCATE TABLE doctor_detail RESTART IDENTITY;
參考
https://stackoverflow.com/questions/5342440/reset-auto-increment-counter-in-postgres
目前需求是, 某欄位的日期要等於今天
簡單的說, 就是今天應到的人數統計
這部分我是用
extract(day from 'DATE_A'::timestamp - 'DATE_B'::timestamp) = 1
select count(sb.id) from schedule_bed sb where sb.code_id=244 and sb.book_period=238 and (select extract(day from sb.book_date::timestamp - current_date::timestamp)=0)
然而還有第二個問題
就是在JPQL中, 及使用native SQL 它的冒號也是有意義的, 表示參數
後來查了資料得知, 原來要用雙斜線解決\\, 每個冒號前面都要來兩個, 如下
//另外補充 撈取是否為本月資料如下
SELECT count(pr.id) FROM patient_returned pr WHERE DATE_PART('MONTH', pr.dead_date) = DATE_PART('MONTH', NOW())
參考:
https://stackoverflow.com/questions/24929735/how-to-calculate-date-difference-in-postgresql
https://stackoverflow.com/questions/4169582/escaping-the-colon-character-in-jpa-queries
出現在專案上面冒紅線, 並有紅字invalid packing...... 在本專案的原因是, 這裡有母子專案 有在子專案pom檔中聲明parent <parent> <artifactId> heima-leadnews-test </a...