Skip to content

Benjr.tw

  • Linux
    • Stress & Performance
    • Hardware Info
    • System Monitor
    • Security
    • Desktop
    • PXE
    • Filesystem Hierarchy Standard
    • Linux 開機選項
    • Linux Package Manager
    • 備份 Backup
  • Virtualization
    • Docker & Podman
    • CoreOS
  • NAS/SAN
  • Programming Language
    • Python
    • Bash shell script
    • Perl
    • PHP
    • Node.JS
    • VBA
    • javascript
    • Power Query
    • PowerShell
  • WordPress
  • DataBase
    • 資料庫安裝
    • 資料庫語法
    • SQLite
    • MariaDB JSON

Database

SQL 語法 進階 SELECT – Date/Time Periods

2020-04-162020-04-17 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 (虛擬機) . 我有一個溫度統計(數字) 的資料庫,要如何針對時間區間 (Date Time) 來統計資料,可以使用函數 UNIX_TIMESTAMP 來分類,搜尋. 先建立一個資料庫 (testdb) 與 tables (tempsta) 格式為 數字欄 […]

Read more

SQL – WHILE , REPEAT , LOOP & LEAVE , ITERATE

2020-02-122020-05-20 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

多筆的 SQL 敘述,可以儲存成為 Stored Routines Procedure 或是 User-Defined Function (UDF) . 在 Stored Routines 會常用到 SQL Flow Control Statements 除了 CASE , IF (詳細請參考 – […]

Read more

SQL 語法 – CTE (Common Table Expression)

2020-01-212023-05-10 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

SELECT 後的資料有辦法儲存到變數嗎,有的請參考 – https://benjr.tw/102432 , 那如果是要儲存整張 SELECT 後的 Table 呢! 可以使用 CTE (Common Table Expression).想要存取階層式的資料可以透過 Recursive […]

Read more

SQL 語法 – OVER 與 PARTITION BY 用法

2020-01-182020-02-04 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

在 MAriaDB 裡面提到關於 Window Functions Overview – https://mariadb.com/kb/en/window-functions-overview/ 關於這些 Function 函數定義請參考. Window Functions &#8211 […]

Read more

SQL 語法 SET , := 以及 SELECT INO

2019-12-242020-05-13 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 7 x86_64 (虛擬機) SELECT 後的資料有辦法儲存到變數嗎? 可以透過幾種方式. SELECT 查詢需注意資料庫字元編碼 Character Sets 與 文字排序 Collations ,請參考資料庫編碼 – https://benjr.tw/10 […]

Read more

SQL 變數 Variables

2019-12-242020-02-11 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 7 x86_64 (虛擬機) 這邊來看一下 MySQL / MariaDB SQL 變數 Variables 的種類. 先建立一個資料庫 (testdb) , 與 tables (employee) 格式為 Name char(20), Dept char(20), job […]

Read more

MySQL – Master Slave Replication – log_bin_trust_function_creators

2019-12-202021-02-22 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 7 / CentOS 8 x86_64 (虛擬機) 在建立 Stored Function 時卻得到以下的錯誤訊息. 奇怪另外一台相同的版本 MySQL (其實是 MariaDB) 可以建立自訂函數,這是為什麼? 主要原因是當你有使用 Binlog 的機制時,會被限制建立 […]

Read more

SQL 語法 SELECT Duplicate Row (Column)

2019-11-212019-11-21 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

如何找到重覆的資料 (Duplicate Row , Column or Record) 測試環境為 CentOS 8 x86_64 (虛擬機) 先建立一個測試用資料庫 (testdb) , 與 tables (employee) 格式為 K1 int(11) – auto_increm […]

Read more

MariaDB – Master Slave Replication

2019-11-132023-08-11 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

為了避免硬碟損毀進而造成資料庫遺失,可以使用主從式資料庫 (Master Slave Replication) 的技術. Master 的資料庫會透過 Binlog 的機制將資料同步到 Slave . Master 不是真的會把資料複製一份到 Slave,而是 Master 會把所有會變動到資料的指 […]

Read more

SQL 語法 SELECT Last Row (Column)

2019-11-082020-10-14 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

如何找到最後一筆 (Last Row , Last Column or Latest Record) 輸入的資料. 測試環境為 CentOS 8 x86_64 (虛擬機) 先建立一個測試用資料庫 (testdb) , 與 tables (employee) 格式為 K1 int(11) &#8211 […]

Read more

文章導覽

較舊的文章
較新的文章

近期文章

  • Windows – Network Sharing + Port forwarding to VM
  • Ansible – gather facts
  • Ansible – host_vars 定義特定的變量
  • Ansible 範例 – Chrony daemon
  • Ubuntu NTP Client 校時設定

近期留言

  • 「Jackson2734」於〈Ubuntu NTP Client 校時設定〉發佈留言
  • 「w」於〈Ubuntu 16.04 Server PXE 安裝〉發佈留言
  • 「admin」於〈TCP/IP 常見封包〉發佈留言
  • 「stu」於〈TCP/IP 常見封包〉發佈留言
  • 「student」於〈Linux command – tcpdump〉發佈留言

分類

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文
  • Privacy Policy
  • 隱私權政策
Powered by WordPress | Theme: Astrid by aThemes.