1
votes

How to set Autoincrement Id starts with Even Or Odd Number in SQLite With Flutter? As we have solution for MySQL but for SQLite is there any way to set Autoincrement starts with Even Or Odd Numbers

1

1 Answers

-1
votes

As I know same syntax is used in SQLite so if you know how to do it in MySQL just copy and paste it. for example this has same syntax as in MySQL.

  var database = await openDatabase(
          path,
          version: 1,
          onCreate: (Database db, int version) async {
            await db.execute('''
            CREATE TABLE $alarm(
              $columnId INTEGER PRIMARY KEY AUTOINCREMENT,
              $columntitle TEXT NOT NULL,
              $columnAlarmId INTEGER,
              $columnDateTime TEXT NOT NULL,
              $columnDaysOn UINT8LIST
              )        
             ''');
          },
        );
        return database;
      }