sqlite2 [sqlite/SQL] 문법 몇가지 .open database_name;.table. CREATE TABLE table_name ( no integer primary key autoincrement, name text ); INSERT INTO table_name ( name ) values ( 'name_1' ), ( 'name_2' ), ( 'name_3' ); INSERT INTO table_name ( no, name ) (SELECT exp1, exp2 FROM some_table WHERE condition); 2014. 2. 26. [sqlite] ver.3 사용 예제 #include #include #include #include int main( int argc, char *argv[] ){ sqlite3 *database = NULL; sqlite3_stmt *statement = NULL; char *sql = "SELECT * FROM ? WHERE ? = ?"; char *dbname = ""; if ( SQLITE_OK != sqlite3_open( dbname, &database ) ) { // error } if ( SQLITE_OK != sqlite3_prepare( &database, sql, strlen( sql ), &statement, NULL ) ) { // error } if ( SQLITE_OK != sqlite3_bind_????( &s.. 2014. 2. 25. 이전 1 다음