---
title: "android SQLite错误：no such column xxx"
author: "sinye"
date: "2012-12-20T10:15:38Z"
tags: []
categories: ["移动开发"]
slug: "android-sqlite-no-such-column-xxx"
draft: false
lastmod: "2012-12-20T10:18:38Z"
id: 1750791
url: "https://sinye.iteye.com/blog/1750791"
---

在Android开发中使用SQLite时，有时候向数据库中插入一些值，一定要注意对text类型的字段的插入，如果使用的是这样的sql ： insert into 表名 values(id,name),记得name在插入时，使用'name'，要加上' ' 否则就会出现no such column xxx错误，截图如下：

![](http://dl.iteye.com/upload/attachment/0078/1853/55c2780c-4b43-3ea5-8f02-05768e29b71d.png)