Files
order_system/update_table.txt
2025-09-16 12:38:41 +08:00

15 lines
467 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

請根據以下需求幫我產生一段 Python 程式碼能夠連線到資料庫並在orders的資料表修改欄位main_course型態為varchar(255)
資料庫資訊:
DB_HOST = mysql.theaken.com
DB_PORT = 33306
DB_NAME = db_A027
DB_USER = A027
DB_PASSWORD = E1CelfxqlKoj
需求:
1. 使用 mysql.connector 套件
2. 資料表在orders 幫我修改
- main_course : 主餐點名稱(varchar(255))
3. 執行成功後,印出「資料表修改成功!」。