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

MariaDB – Remove repeated words in string

2023-05-252023-05-25 adminLinux, MariaDB, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 虛擬機. 欄位資料為 ‘ABC12 , C2CC , ABC12 , C2CC , DD23’ 這樣有辦法移除重覆出現在單字嗎? 目前看到一個方式 – https://stackoverflow.com/question […]

Read more

MariaDB – Thread Pool

2023-05-182023-05-18 adminLinux, MariaDB, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 虛擬機. 預設在 SQL 使用上單一個 connect 只能使用單個 Thread,如果是比較複雜的指令的時候就會變慢. 參考文章 – https://mariadb.com/kb/en/thread-pool-in-mariadb/ 我們是可 […]

Read more

MariaDB – Condition Group

2023-05-162023-05-17 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 虛擬機. 在 Group 資料時可以使用 IF 判斷式來決定使用哪個欄位,看一下下面範例. 建立測試用資料表. 檢視一下資料. 在 Group 資料時用 IF 判斷式來決定使用哪個欄位 程式說明: 最主要就是在 GROUP BY 時加上判斷式 IF(Fil […]

Read more

MariaDB – String Split using CTE

2023-05-112023-05-24 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 虛擬機. 有辦法在單一欄位的資料依據分隔字元將字串拆解成陣列嗎? 如: 依據分隔字元 ‘ , ‘ 將以上字串拆解成以下陣列. MyaSQL / MariaDB 找不到相關函數 ( PostgreSQL 有相關 string_to_a […]

Read more

MariaDB – Count the number of occurrences of a string

2023-05-102023-05-10 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 虛擬機. 有辦法計算字串 (如: This is MySQL , Mysql is Database) 裡面的字 (如: MySQL) 出現幾次嗎? 找不到相關函數.不過找到一個方式,參考文章 – https://www.tutorialspo […]

Read more

SQLite – User-Defined Functions

2023-02-152023-02-16 adminLinux, Python, RedHat / CentOS, SQLite

Loading

測試環境為 CentSO 8 (虛擬機) SQLite 無法像是 MySQL 或是 MariaDB 使用者自訂函數 ( User-Defined Functions ) ,不過我們可以透過 SQLite 的 extensions – https://github.com/nalgeon/ […]

Read more

SQLite – IIF & CASE expression

2023-02-152023-02-15 adminSQLite

Loading

SQLite 沒有 IF 函數,可以使用 IIF 函數來取代,用法是一樣的. IIF 但需要高於 SQLite v3.32.0 以上版本才有提供. 函數說明 The iif(X,Y,Z) function returns the value Y if X is true, and Z otherwi […]

Read more

MariaDB – Count Number of Consecutive Occurrence of values

2023-02-132023-03-02 adminLinux, MariaDB, Mysql, RedHat / CentOS, SQLite

Loading

測試環境為 CentOS 8 X86_64 (虛擬機) 如何計算出連續資料的數目,參考文章 – https://stackoverflow.com/questions/36927685/count-number-of-consecutive-occurrence-of-values-in […]

Read more

SQLite – WITH Clause

2023-02-082023-02-08 adminSQLite

Loading

使用 WITH Clause 的方式,參考文章 https://www.sqlite.org/lang_with.html 透過 CTE : Common Table Expressions ,它可以把 SELECT 後整個 Table 儲存起來,共後續 SQL 語法來使用.而 Recursive […]

Read more

SQLite – Declare variable

2023-02-082023-02-08 adminSQLite

Loading

在 MSSQL (MariaDB) 可以透過以下方式來設定一個暫時使用的變數. 但在 SQLite 卻無這個功能,需透過以下的方式來處里. 執行結果

Read more

文章導覽

較舊的文章

近期文章

  • MariaDB – Remove repeated words in string
  • Python
  • MariaDB – Thread Pool
  • MariaDB – Condition Group
  • MariaDB – String Split using CTE

近期留言

  • 「MMM」於〈Windows – Fio〉發佈留言
  • 「UQA」於〈Linux – EFI 的磁碟分區〉發佈留言
  • 「[mysql] | 飛狼實驗室[wp]」於〈MariaDB 資料庫 – 使用者密碼〉發佈留言
  • 「菜单加密码」於〈Windows command – BCDEdit〉發佈留言
  • 「N/A」於〈Linux – iperf (Bind to host)〉發佈留言

分類

其他操作

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