FMDB에 CREATE TABLE
명령을 줄 때마다 내부적으로 해당 SQLite 쿼리로 변환되므로 걱정하지 않아도됩니다.
SQLite는 웹 사이트에 주어진 공식 문서에 따라, 그것은 상태 :
"It is usually an error to attempt to create a new table in a database that already contains a table, index or view of the same name."
을 그래서, 이름이 같은 다른 테이블을 만들려고하면, SQLite는 말에 오류가 발생합니다 :
create table test_table (test_no NUMBER, test_name TEXT); //Table created
/* Now, try creating the table again */
create table test_table (test_no NUMBER, test_name TEXT);
다음과 같은 오류가 발생합니다.
오류 : 테이블 test_table 이미
그래서, 테이블의 존재에 대한 SQLite는 검사가,이 같은 이름을 가진 다른 테이블을 허용하지 않습니다 존재한다.
자세한 내용은 설명서를 참조하십시오. 당신이 함께 존재 여부를 확인할 수 있습니다
create table if not exists test_table (test_no NUMBER, test_name TEXT);
나 :
select sql from SQLITE_MASTER where name = 'test_table'
그리고 당신이 얻을 있는지
소스http://www.sqlite.org/lang_createtable.html
자세한 답변 해 주셔서 감사합니다. – pedros
도움이 된다니 기쁘다. –