Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
mySQLデータベースにtrue/false / 1/0値を格納するための最も適切な(データ消費量が最も少ない)データフィールドは何ですか?
私は以前に1文字の長いtinyintを使用しましたが、それが最善の解決策であるかどうかわかりませんか?
ありがとう!
tinyint(1)
基本的にBOOLデータ型からエイリアス化されているため、問題ありません。
こちらをご覧ください
さらに、これはすでにここでカバーされています:
ブール値の格納に使用するMySQLデータ型