2021年11月5日 星期五

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

SQLite是一個RDBMS(relational database management system,

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

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

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

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

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

>>無伺服器(Serverless)

>>獨立自成體系Self-Contained

>>零配置Zero-configuration

>>交易性Transactional

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

 

£複製成新資料庫

複製目前資料庫,到指定的檔名

● clone  新資料庫名稱

£修改結構

       新增欄位

alter table Table add 欄名 型態;

>例

alter table Customer add Gender char(1);

£練習9:

1.將目前Testdb1資料庫,複製一份,名稱為 testdb3.bak

1.sqlite .clone testdb3.bak

person... done

test... done

2.查看目前資料庫

2.sqlite .database

main: /home/bigred/testdb1

3.切換到 testdb3.bak資料庫

3.sqlite .open testdb3.bak

4.查看目前資料庫

4.sqlite .database

main: /home/bigred/testdb3.bak

5.顯示資料庫已有的table

5.sqlite .table

person  test

6.顯示 test表格 的結構

6.sqlite .schema test

CREATE TABLE test ( name var(10) ,tel var(10));

7.新增 sex 欄位,資料型態為char(1)

7.sqlite alter table test add sex char(1);

 

相關單元:

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

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

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

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...