---
title: "Autoincrement values in column in SQLite database"  
description: "Autoincrement values in column in SQLite database"  
author: "Anonymous User"  
published: 2015-11-18  
updated: 2015-11-20  
canonical: https://www.mindstick.com/forum/33609/autoincrement-values-in-column-in-sqlite-database  
category: "sqlite"  
tags: ["database", "sqlite"]  
reading_time: 1 minute  

---

# Autoincrement values in column in SQLite database

I want to create a column in [SQLite database](https://www.mindstick.com/articles/1554/crud-operation-in-asp-dot-net-using-sqlite-database) that takes [values](https://www.mindstick.com/forum/327/sum-textbox-values)(SerialNo or ID) automatically to be unique.\
[column value](https://www.mindstick.com/forum/161178/how-to-delete-duplicate-rows-based-on-single-column-value-in-mssql) I want to start from 0.\
How to implement it in database.

## Replies

### Reply by Tarun Kumar

Use this- SQLite autoincrement syntax, at the time of table definition:\
CREATE TABLE EMPLOYEE(id INTEGER PRIMARY EKY AUTOINCREMENT, name TEXT NOT NULL, age INT NOT NULL);

To insert values into this EMPLOYEE table, use syntax like this:\
INSERT INTO EMPLOYEE (name, age) VALUES ('JOHN',25);\
[Column](https://www.mindstick.com/forum/33860/how-to-calculate-column-summary-in-sql-server) 'id' will increment its values by autoincrement feature of SQLite [database](https://www.mindstick.com/articles/12226/use-of-database-in-sencha-extjs-and-insert-record-from-user-form-using-ajax).(by default increment will be from 1, and so on)


---

Original Source: https://www.mindstick.com/forum/33609/autoincrement-values-in-column-in-sqlite-database

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
