2021年11月6日 星期六

10-SQL命令-文字運算-文字合併||-通配字元% _-where 欄名 like-where 欄名 in

SQLite是一個RDBMS(relational database management system,

關聯式資料庫管理系統),

SQLite中的lite意味著在設置,資料庫管理和所需資源方面的輕量級

SQLite 是一個非常可靠的資料庫,它可以處理 TB 級的資料。

SQLite 號稱是部署和使用最廣泛的資料庫引擎。

SQLite具有以下值得注意的功能:

>>無伺服器(Serverless)

>>獨立自成體系Self-Contained

>>零配置Zero-configuration

>>交易性Transactional

££££本單元內容如下:

£通配字元

單一字元 _

任何字元 %

 

SELECT "欄位"

FROM "表格名"

WHERE "condition";

>例

Where name = ‘lee’

Where name like ‘y%’

where name like ‘_ _y%’

where name like ‘_ _c_o%’

where name =‘lee’ or name =‘wang’ or name = ‘victor’

Where name in (‘lee’,’wang’,’victor’)

Where name  not in (‘lee’,’wang’,’victor’)

Where length(name)=4

Where length(name)!=4

Where length(name)<>4

 

練習十一-查詢文字資料

1.顯示姓名(name)lee的人

sqlite select * from person where name ='lee';

lee|0933000333|M|33000

2.顯示姓名(name) l打頭的人

sqlite select * from person where name like 'l%';

lee|0933000333|M|33000

3.顯示姓名(name)2字元為a,4字元為g的人

sqlite select * from person where name like '_a_g%';

wang|0944000444|M|50000

4.顯示姓名(name)lee wang的人

sqlite select * from person where name ='lee' or name ='wang';

lee|0933000333|M|33000

wang|0944000444|M|50000

sqlite select * from person where name in('lee','wang');

lee|0933000333|M|33000

wang|0944000444|M|50000

5.顯示姓名(name)字元數只有4 (長度為4)的資料

5.sqlite select * from person where length(name)=4;

john|0911000111|M|30000

wang|0944000444|M|50000

babe|0955566566|F|46000

6.顯示姓名(name)字元數不為4 (長度不為4)的資料

sqlite select * from person where length(name)!=4;

marry|0922000222|F|25000

lee|0933000333|M|33000

victor|09123456789|M|55000

sqlite select * from person where length(name)<>4;

marry|0922000222|F|25000

lee|0933000333|M|33000

victor|09123456789|M|55000

 

 

 

相關單元:

01-資料庫DATABASE相關專有名詞介紹-RDBMSDBMSdatabasetablerecordfieldPrimary KeyForeign keydatabase normalizationFirst normal form1NF)、2NF

https://youtu.be/-lpbA1pjPzs

02-SQLITE3簡介

https://youtu.be/Zj6d5G6bgCo

03-sqlite3視窗版安裝概念

https://youtu.be/HiPk_pZFBCQ

03安裝SQLliteSQL語言(Windows )

https://youtu.be/pE9cw-JeHfA

04 SQL基本命令 SQLite3為例 create table insert table update select https://youtu.be/txYFSUdjttA

05 SQL的運算與delete刪除記錄

https://youtu.be/bjyvA1va-9Q

06-SQL基本命令 -insert一次插入多筆記錄及練習

https://youtu.be/-D8IPgCOqBE

06-SQL基本命令 -insert一次插入多筆記錄及練習

https://youtu.be/-D8IPgCOqBE

07-SQL命令-alter table add增加欄位

https://www.youtube.com/watch?v=t8vRQ9Ccyys

08-SQLite3-mode顯示或切換-資料顯示格式

https://youtu.be/tBqQc-YVapA

09-SQL where 條件-and or not-between and -in-綜合練習

https://youtu.be/dZP9bfz93YY

10-SQL命令-文字運算-文字合併||-通配字元% _-where 欄名 likewhere 欄名 in

https://youtu.be/DOvb7gLPq9s

SQL函數及應用說明

https://youtu.be/gd6-DxLGEGg

SQLite總複習(整理)

https://youtu.be/m-ZiWP-PSZg

 

 

相關演講:

20211004社群行銷之客戶關係管理

https://youtu.be/goWBKR7fLqw

 

相關活動:

 ▶▶▶▶▶▶▶▶活動資訊

臺灣雲市集 TCloud 計畫 最高可獲政府補助點數 30,000 1 = 新臺幣 1 叡揚雲端方案連結

https://reurl.cc/a9RVvQ

線上講座_找對雲端工具包,打造營運新活水 叡揚資訊 雲端及巨資事業群 賴俊仁 處長

https://reurl.cc/AkpA7Z

 

標籤

#database#table#Record#field#primary key#Foreign Key#First normal form1NF#DBMS(DataBase Management System)#RDBMS(Relational DataBase Management System)#database normalization#關聯式資料庫管理系統#資料庫管理系統#資料庫#表格#記錄#欄位#第一階正規化#第二階正規化#資料庫正規化#主鍵#外鍵#ACCESS#MYSQL#MariaDB#SQLite3

頻道

#SQLite頻道

https://www.youtube.com/playlist?list=PLWkbsqjwqW3gSEIUilE2KFXXu0sTWxh2u

 

 


沒有留言:

張貼留言

如何免費增加monica AI使用次數

⚡chrome 線上應用程式商店-Monica-ChatGPT4驅動的AI Copilot https://chromewebstore.google.com/detail/monica-your-ai-copilot-po/ofpnmcalabcbjgholdjcjblkibo...