android – I am getting a SQLite syntax error while creating table. not not able to correct the error-ThrowExceptions

Exception or error:
 Caused by: android.database.sqlite.SQLiteException: near "Delete": syntax error (code 1): , while compiling: Create Table Notes ( ID INTEGER PRIMARY KEY, Title TEXT NOT NULL, Description TEXT NOT NULL, Archive INTEGER, Delete INTEGER, Pinned INTEGER, Label VARCHAR(20), Reminder VARCHAR(20), Position INTEGER, Colour INTEGER )

this is my CREATE_TABLE_NOTE

 private const val TABLE_NOTE = "Notes"
    private const val NOTE_ID = "ID"
    private const val KEY_TITLE = "Title"`enter code here`
    private const val KEY_DESCRIPTION = "Description"
    private const val KEY_ARCHIVE = "Archive"
    private const val KEY_DELETE = "Delete"
    private const val KEY_PINNED = "Pinned"
    private const val KEY_LABEL = "Label"
    private const val KEY_REMINDER = "Reminder"
    private const val KEY_POSITION = "Position"
    private const val KEY_COLOUR = "Colour"
    const val CREATE_NOTE_TABLE =
        " Create Table $TABLE_NOTE ( " +
                "$NOTE_ID INTEGER PRIMARY KEY, " +
                "$KEY_TITLE TEXT NOT NULL, " +
                "$KEY_DESCRIPTION TEXT NOT NULL, " +
                "$KEY_ARCHIVE INTEGER, " +
                "$KEY_DELETE INTEGER, " +
                "$KEY_PINNED INTEGER, " +
                "$KEY_LABEL VARCHAR(20), " +
                "$KEY_REMINDER VARCHAR(20), " +
                "$KEY_POSITION INTEGER, " +
                "$KEY_COLOUR INTEGER )"

}
How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *