Access資料庫表的資料型別

2021-06-15 21:58:28 字數 804 閱讀 7632

在access裡,備註型別用memo表示,所以改變欄位的資料型別為備註的sql為:

alter table user alter column userinfo memo

對了,如果user表有外來鍵,而且你要修改的字段就是外來鍵的話,你就不能修改啦!

下面給出修改為其它型別的sql(表為tb,欄位為aa):

alter table tb alter column aa byte 數字[位元組]

alter table tb alter column aa long 數字[長整型]

alter table tb alter column aa short 數字[整型]

alter table tb alter column aa single 數字[單精度

alter table tb alter column aa double 數字[雙精度]

alter table tb alter column aa currency 貨幣

alter table tb alter column aa char 文字

alter table tb alter column aa text(n) 文字,其中n表示字段大小

alter table tb alter column aa binary 二進位制

alter table tb alter column aa counter 自動編號

alter table tb alter column aa memo 備註

alter table tb alter column aa time 日期/時間 

Access 資料庫的資料型別

今天開發資料庫通用元件時,做c 資料庫型別與access資料庫型別的相互轉化時,發現access中 text 型別的最大長度為255,當長度超過255時,需改用 memo 型別,但需要注意備註 memo 型別的長度不能直接設定。錯誤寫法 alter table tablename add colum...

Access 資料庫與sql資料庫資料型別的比較

下表比較了 microsoft access 資料庫 microsoft access 資料庫 資料和物件 如表 查詢或窗體 組成的集合,與特定的主題或用途有關。microsoft jet 資料庫引擎用於管理資料。和 microsoft access 專案 microsoft access 專案 與...

access 資料型別

資料型別 儲存量大小 說明binary 每個字元佔 1 個位元組 任何型別的資料都可以儲存在這種型別的字段中。不進行資料轉換 例如,轉換成文字 資料怎樣輸入到二進位製字段就怎樣作為輸出顯示,bit1 個位元組 值為 yes 和 no,並且該欄位只能取這兩個值中的乙個。tinyint 1 個位元組 在...