· 8 years ago · Nov 27, 2017, 08:46 AM
1public static final String SQL = "SELECT * " +
2 "FROM " + Pupils.TABLE_NAME + " ls INNER JOIN " + Genders.TABLE_NAME + " rs " +
3 "ON ls." + Pupils.COLUMN_GENDER_ID + " = rs." + Genders._ID;
4
5public static class Genders implements BaseColumns {
6 public static final String TABLE_NAME = "genders";
7 public static final String COLUMN_GENDER = "genderTitle";
8
9
10 public static final String CREATE_TABLE = "CREATE TABLE IF NOT EXISTS " +
11 TABLE_NAME + " (" +
12 _ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
13 COLUMN_GENDER + " TEXT" + ")";
14}
15
16public static class Positions implements BaseColumns {
17 public static final String TABLE_NAME = "positions";
18 public static final String COLUMN_POSITION = "positionTitle";
19
20
21 public static final String CREATE_TABLE = "CREATE TABLE IF NOT EXISTS " +
22 TABLE_NAME + " (" +
23 _ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
24 COLUMN_POSITION + " TEXT" + ")";
25}