---
title: "数据库中布尔值boolean,TINYINT"
author: "wangsong76"
date: "2011-10-17T15:50:46Z"
tags: []
categories: ["编程语言"]
slug: "boolean-tinyint"
draft: false
lastmod: "2011-10-17T16:17:37Z"
id: 1198528
url: "https://wangsong76.iteye.com/blog/1198528"
---

引用： \[url]http://dev.mysql.com/doc/refman/5.1/zh/column-types.html#column-type-overview\[/url] BOOL，BOOLEAN 是TINYINT(1)的同义词。zero值被视为假。非zero值视为真。 如果是用hibernate映射的时候，就直接是 java.lang.Boolean---&gt;tinyint(1) 例： \[code="java"] \[/code]