안드로이드 스튜디오에서 sql문 짜보는데
처음해보는 늒네라 도대체 뭐가 틀렸다는건지를 모르겠음
+ "아메리카노" + "' , '" + "5000" + "' , '"
+ edtAmericanoNum.getText().toString() + "');");db.execSQL("CREATE TABLE goods (goodsName CHAR(20) primary key, price INTEGER(15), goodsAmount CHAR(30));");
에러메세지
android.database.sqlite.SQLiteException: no such table: goods (code 1): , while compiling: INSERT INTO goods VALUES ( '아메리카노' , '5000' , '3');
두시간동안 이거때문에 쩔쩔매고있음..
미치겠네
Insert into goods (goodsName, ..) values
근데 지금보니 테이블 생성도 안된거같은데
android.database.sqlite.SQLiteException: near ";": syntax error (code 1): , while compiling: INSERT INTO goods ( '아메리카노' , '5000' , '3')VALUES; 요렇게뜨네..
이놈시끼 sql공부부터 다시하고와
데에엥 ..
아 댓글이 왜 안써지지 걍 테이블부터 만들어. 생각해보니 다집어넣을건데 괄호해서 필드는 안넣어도 되는구나
int값은 따옴표 필요없고 세미콜론 있어도 없어도 작동함
이새끼는 sql이 뭔지도 모르나