or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
計算機概論Lab-12
SQL
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →https://hackmd.io/@IMOK/Lab12
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →講師: 賴昱有
BEFORE CLASS
http://140.121.197.13/tutorial
先下載解壓縮後執行安裝
SQLServer2017-SSEI-Expr.exe
什麼是資料庫
關聯式資料庫
Relational Database Management System(RDBMS)
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →非關聯式資料庫
NoSQL (Not Only SQL)
匯入範例資料庫
CRUD IN MYSQL
SELECT
基本指令形式
e.g.
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →查找 Description 是 S 開頭的
降序排序(DESC)、升序排列(ASC)
數資料筆數
INNER JOIN
Categories
Products
Inner Join on CategoryID
INSERT
基本指令形式
e.g.
UPDATE
基本指令形式
e.g.
DELETE
基本指令形式
e.g.
延伸閱讀
w3schools-sql
作業網站
作業做完請上傳到 http://140.121.197.13/tutorial
並且注意上傳時間限制、檔名、其他規範
上課時提前做完可以直接給助教 demo 登記
就不需要上傳 demo 過的部分
Question 1
使用 SQL 指令查詢 Northwind 資料庫內的 Order 資料表 EmployeeID=5 的資料Question 2
使用 SQL 指令查詢 Northwind 資料庫內的 Order 資料表
EmployeeID 介於 3 到 6 的資料
並且將查詢結果根據 EmployeeID 進行由大至小的排序
Question 3
使用 SQL 指令計算 Northwind 資料庫內的
Order 資料表共有幾筆訂單。
Question 4
使用 SQL 指令在 Northwind 資料庫內的 Products 資料表
新增一筆 Products 的資料,內容不限。
Question 5
使用 SQL 指令在剛剛新增的 Products 資料將
ProductName 設定為 Egg,UnitPrice設定為 12.00。
Question 6
使用 SQL 指令刪除 Northwind 資料庫內的
Products 資料表你所新增的 Products 資料
Question 7
使用 SQL 指令將 Northwind 資料庫內
Categories、Order Details 以及 Products 資料表進行結合
查詢出每筆訂單詳細的
產品名稱 (ProductName)、種類名稱(CategoryName) 及單位價格 (UnitPrice)