title: Simple Android app - SQLite - SQL has stopped
body: <p>I was writing an app using Android Studio. It's simple app for exercises.
  I was sure it will work, but no. Something is wrong.
  I will paste my code here:</p>
  
  <pre><code>package programowanie.android.sql;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.Toast;
  
  public class MainActivity extends AppCompatActivity {
  
      DatabaseHelper db;
  
      EditText editTextImie;
      EditText editTextNazwisko;
      EditText editTextTelefon;
      EditText editTextEmail;
      EditText editTextUlica;
      EditText editTextKod;
  
      Button btDodaj;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          db = new DatabaseHelper(this);
  
          editTextImie = (EditText) findViewById(R.id.editTextImie);
          editTextNazwisko = (EditText) findViewById(R.id.editTextNazwisko);
          editTextTelefon = (EditText) findViewById(R.id.editTextTelefon);
          editTextEmail = (EditText) findViewById(R.id.editTextEmail);
          editTextUlica = (EditText) findViewById(R.id.editTextUlica);
          editTextKod = (EditText) findViewById(R.id.editTextKod);
  
          btDodaj = (Button) findViewById(R.id.btDodaj);
  
          btDodaj.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  boolean czysieudalo;
                  czysieudalo = db.wstawdane(editTextImie.getText().toString(), editTextNazwisko.getText().toString(), editTextTelefon.getText().toString(), editTextEmail.getText().toString(), editTextUlica.getText().toString(), editTextKod.getText().toString());
                  if(czysieudalo){
                      Toast.makeText(MainActivity.this, "Udało się!", Toast.LENGTH_SHORT).show();
                  } else {
                      Toast.makeText(MainActivity.this, "Niestety nie udało się :(!", Toast.LENGTH_SHORT).show();
                  }
              }
          });
      }
  }
  </code></pre>
  
  <p>This is my DatabaseHelper class:</p>
  
  <pre><code>    package programowanie.android.sql;
  
  import android.content.ContentValues;
  import android.content.Context;
  import android.database.sqlite.SQLiteDatabase;
  import android.database.sqlite.SQLiteOpenHelper;
  
  /**
   * Created by Kudłaty on 2016-02-19.
   */
  public class DatabaseHelper extends SQLiteOpenHelper {
      public static final String database_name ="Kontakty";
      public static final String database_table ="Osoby";
  
      public DatabaseHelper(Context context) {
          super(context, database_name, null, 1);
      }
  
      @Override
      public void onCreate(SQLiteDatabase db) {
          db.execSQL("create table" + database_table + "(ID INTEGER PRIMARY KEY AUTOINCREMENT, IMIE TEXT, NAZWISKO TEXT, NUMER_TELEFONU TEXT, EMAIL TEXT,  ULICA TEXT, KOD_MIASTO TEXT");
      }
  
      @Override
      public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
          db.execSQL("DROP TABLE IF EXIST" + database_table);
          onCreate(db);
      }
  
      public boolean wstawdane(String imie, String nazwisko, String nr_tel, String email, String ulica, String kod ){
          SQLiteDatabase db = this.getWritableDatabase();
          ContentValues cv = new ContentValues();
          cv.put("Imie", imie);
          cv.put("Nazwisko", nazwisko);
          cv.put("Nr telefonu", nr_tel);
          cv.put("Email", email);
          cv.put("Ulica", ulica);
          cv.put("Kod pocztowy", kod);
          if (db.insert(database_table, null, cv)==-1){
              return false;
          } else {
              return true;
          }
  
      }
  }
  </code></pre>
  
  <p>I have no errors, but when I'm trying to add Record app stopping and I get "SQL has stopped"</p>
  
  <p>I forgot to paste Log! Here u are!</p>
  
  <pre><code>02-19 18:02:43.119 2087-2087/programowanie.android.sql I/art: Not late-enabling -Xcheck:jni (already on)
  02-19 18:02:43.195 2087-2087/programowanie.android.sql W/System: ClassLoader referenced unknown path: /data/app/programowanie.android.sql-1/lib/x86
  02-19 18:02:43.348 2087-2115/programowanie.android.sql D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
  02-19 18:02:43.410 2087-2115/programowanie.android.sql I/OpenGLRenderer: Initialized EGL, version 1.4
  02-19 18:02:43.544 2087-2115/programowanie.android.sql W/EGL_emulation: eglSurfaceAttrib not implemented
  02-19 18:02:43.544 2087-2115/programowanie.android.sql W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xabdff300, error=EGL_SUCCESS
  02-19 18:03:19.132 2087-2087/programowanie.android.sql E/SQLiteLog: (1) near "tableOsoby": syntax error
  02-19 18:03:19.133 2087-2087/programowanie.android.sql D/AndroidRuntime: Shutting down VM
  02-19 18:03:19.133 2087-2087/programowanie.android.sql E/AndroidRuntime: FATAL EXCEPTION: main
                                                                           Process: programowanie.android.sql, PID: 2087
                                                                           android.database.sqlite.SQLiteException: near "tableOsoby": syntax error (code 1): , while compiling: create tableOsoby(ID INTEGER PRIMARY KEY AUTOINCREMENT, IMIE TEXT, NAZWISKO TEXT, NUMER_TELEFONU TEXT, EMAIL TEXT,  ULICA TEXT, KOD_MIASTO TEXT
                                                                               at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
                                                                               at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:887)
                                                                               at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:498)
                                                                               at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
                                                                               at android.database.sqlite.SQLiteProgram.&lt;init&gt;(SQLiteProgram.java:58)
                                                                               at android.database.sqlite.SQLiteStatement.&lt;init&gt;(SQLiteStatement.java:31)
                                                                               at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1674)
                                                                               at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1605)
                                                                               at programowanie.android.sql.DatabaseHelper.onCreate(DatabaseHelper.java:21)
                                                                               at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:251)
                                                                               at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
                                                                               at programowanie.android.sql.DatabaseHelper.wstawdane(DatabaseHelper.java:31)
                                                                               at programowanie.android.sql.MainActivity$1.onClick(MainActivity.java:43)
                                                                               at android.view.View.performClick(View.java:5198)
                                                                               at android.view.View$PerformClick.run(View.java:21147)
                                                                               at android.os.Handler.handleCallback(Handler.java:739)
                                                                               at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                               at android.os.Looper.loop(Looper.java:148)
                                                                               at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                               at java.lang.reflect.Method.invoke(Native Method)
                                                                               at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  </code></pre>