SQL 語法 進階 SELECT – Date/Time Periods
測試環境為 CentOS 8 x86_64 (虛擬機) . 我有一個溫度統計(數字) 的資料庫,要如何針對時間區間 (Date Time) 來統計資料,可以使用函數 UNIX_TIMESTAMP 來分類,搜尋. 先建立一個資料庫 (testdb) 與 tables (tempsta) 格式為 數字欄 […]
測試環境為 CentOS 8 x86_64 (虛擬機) . 我有一個溫度統計(數字) 的資料庫,要如何針對時間區間 (Date Time) 來統計資料,可以使用函數 UNIX_TIMESTAMP 來分類,搜尋. 先建立一個資料庫 (testdb) 與 tables (tempsta) 格式為 數字欄 […]
測試作業系統 CentOS 8 x86_64 (虛擬機) 目前 Linux 上的時間同步 NTP ( Network Time Protocol , 透過這個協定跟 NTP Server 的時間來同步) 是透過 chronyd 這個服務,下面來看一下用法. timedatectl 先來看一下 tim […]
PXE (Preboot eXecution Environment) 主要讓系統可以透過網路開機並安裝作業系統(或是 LiveCD),在網卡上有一塊 ROM (Firmware) 裡面存放了一些基本的網路協定 如:Internet Protocol (IP), User Datagram Prot […]
多筆的 SQL 敘述,可以儲存成為 Stored Routines Procedure 或是 User-Defined Function (UDF) . 在 Stored Routines 會常用到 SQL Flow Control Statements 除了 CASE , IF (詳細請參考 – […]
以前會把需要在開機後執行的指令寫在 /etc/rc.local ,但在 CentOS7 / CentOS 8 會發現系統不會去執行該檔案的內容.需要設定後才會去執行,詳細方式請參考 https://benjr.tw/102545 另外一個方式就是自己寫 Systemd Unit Files. 參考文 […]
以前會把需要在開機後執行的指令寫在 /etc/rc.local ,但在 CentOS7 / CentOS 8 會發現系統沒有去執行該檔案的內容.需要以下設定才會執行 /etc/rc.local 的內容. 測試環境 CentOS 7 / CentOS 8 x86_64 (虛擬機) rc.local 有 […]
SELECT 後的資料有辦法儲存到變數嗎,有的請參考 – https://benjr.tw/102432 , 那如果是要儲存整張 SELECT 後的 Table 呢! 可以使用 CTE (Common Table Expression).想要存取階層式的資料可以透過 Recursive […]
在 MAriaDB 裡面提到關於 Window Functions Overview – https://mariadb.com/kb/en/window-functions-overview/ 關於這些 Function 函數定義請參考. Window Functions – […]
安裝好 CentOS 8 (1905) 執行更新,會發現無法更新. 透過 dnf 也一樣,關於 YUM , DNF 請參考 Linux 套件管理 ( Package Manager ) 說明 – https://benjr.tw/2678 在官網有找到說明. https://wiki.c […]
測試環境為 CentOS 7 x86_64 (虛擬機) SELECT 後的資料有辦法儲存到變數嗎? 可以透過幾種方式. SELECT 查詢需注意資料庫字元編碼 Character Sets 與 文字排序 Collations ,請參考資料庫編碼 – https://benjr.tw/10 […]