MySQL Workbench 創建數據庫,添加新表,添加字段


建立數據庫

第一步:

 

第二步:

 

 第三步:

 如圖彈出彈框,繼續點擊Apply按鈕,最后點擊Finish按鈕完成數據庫的建立

 

 

創建表與添加字段

雙擊!!!  一下剛剛建立好的數據庫,然后再創建表,不然會出錯,右鍵點擊Tables 然后點擊Create new tables ,填寫表名,以及字段的信息,之后點擊  apply ,一張表就建完了。

 PK: primary key (column is part of a pk)  主鍵

 NN: not null (column is nullable)  是否為空

-UQ: unique (column is part of a unique key)  外鍵

  AI: auto increment (the column is auto incremented when rows are inserted)  自動增加

  BIN: binary (if dt is a blob or similar, this indicates that is binary data, rather than text)   二進制

  UN: unsigned (for integer types, see docs: “10.2. Numeric Types”)

-ZF: zero fill (rather a display related flag, see docs: “10.2. Numeric Types”)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM