Andoid database SQLite Datatype mismatch : This is not a duplicate question. I understand that there are a lot of questions about this but none of them solved the problem for me.
Why is the datatype mismatched and why is the insertion of the row happening as (name,_id) and not (_id,name) when I call the createRecords method?
    
    package com.caldroidsample;

    import android.content.Context;
    import android.database.sqlite.SQLiteDatabase;
    import android.database.sqlite.SQLiteOpenHelper;
    import android.util.Log;

    import static android.R.attr.text;
    import static android.R.id.primary;
    import static com.caldroidsample.R.id.email;

 

    public class MyDatabaseHelper extends SQLiteOpenHelper {

        private static final String DATABASE_NAME = "DBName";

        private static final int DATABASE_VERSION = 2;

    // Database creation sql statement
        private static final String DATABASE_CREATE = "create table MyEmployees( _id integer primary key, name varchar(255) not null);";

        public MyDatabaseHelper(Context context) {
            super(context, DATABASE_NAME, null, DATABASE_VERSION);
        }

        // Method is called during creation of the database
        @Override
        public void onCreate(SQLiteDatabase database) {
            database.execSQL(DATABASE_CREATE);
        }

    // Method is called during an upgrade of the database,
    @Override
    public void onUpgrade(SQLiteDatabase database,int oldVersion,int newVersion){
        Log.w(MyDatabaseHelper.class.getName(),
                "Upgrading database from version " + oldVersion + " to "
                        + newVersion + ", which will destroy all old data");
        database.execSQL("DROP TABLE IF EXISTS MyEmployees");
        onCreate(database);
    }
    }


This is the class MyDB.java

    package com.caldroidsample;

    import android.content.ContentValues;
    import android.content.Context;
    import android.database.Cursor;
    import android.database.sqlite.SQLiteDatabase;



    public class MyDB{

    private MyDatabaseHelper dbHelper;

    public SQLiteDatabase database;

    public final static String EMP_TABLE="MyEmployees"; // name of table

    public final static String EMP_ID="_id"; // id value for employee
    public final static String EMP_NAME="name";  // name of employee
    public final static String EMP_EMAIL="email"; // email of employee
    public final static String EMP_ADDRESS="address";
    public final static String EMP_GENDER="gender";
    /**
     *
     * @param context
     */
    public MyDB(Context context){
        dbHelper = new MyDatabaseHelper(context);
        database = dbHelper.getWritableDatabase();
    }


    public long createRecords(String id, String name){
        ContentValues values = new ContentValues();

        values.put(EMP_NAME, name);
        values.put(EMP_ID, id);



        return database.insert(EMP_TABLE, EMP_ID, values);
    }

    public Cursor selectRecords() {
        String[] cols = new String[] {EMP_ID, EMP_NAME};
        Cursor mCursor = database.query(true, EMP_TABLE,cols,null
                , null, null, null, null, null);
        if (mCursor != null) {
            mCursor.moveToFirst();
        }
        return mCursor; // iterate to get each value.
    }
    }


