SQLiteÈçºÎɾ³ý¡¢Ð޸ġ¢ÖØÃüÃûÁУ¿
Ê×ÏÈÉùÃ÷£ºÈç¹ûÄãÏëÖ±½Óalter£¬·ÅÆú°É¡£ÒÔÏÂÄÚÈÝ¿ÉÒÔºöÂÔÁË¡£
sqlite¹Ù·½ËµÃ÷ÈçÏ£º
SQLite supports a limited subset of ALTER TABLE. The ALTER TABLE command in SQLite allows the user to rename a table or to add a new column to an existing table. It is not possible to rename a column, remove a column, or add or remove constraints from a table.
´ó¸ÅÒâ˼ÊÇsqliteµÄalter¹¦ÄÜÖ»ÊÇalter tableµÄÒ»¸ö×Ó¼¯£¬Ö»Óв¿·Ö¹¦ÄÜ£¬±ÈÈçÖØÃüÃû±íÃû£¬ÐÂÔöÁе½ÏÖÓбíÖС£
²»Ö§³ÖÏÖÓÐÁеÄÖØÃüÃû£¬É¾³ýºÍÐ޸ġ£
ÎÒÃÇÖ»ÄÜͨ¹ýÁÙʱ±íÀ´½â¾ö¡£
BEGIN TRANSACTION;
CREATE TEMPORARY TABLE temp_table(a);
INSERT INTO temp_table SELECT a from ±í;
DROP TABLE ±í;
CREATE TABLE ±í(a);
INSERT INTO ±í SELECT a from temp_table;
DROP TABLE temp_table;
COMMIT;
ÕâÑù¿ÉÒÔ½â¾ö£¬µ«ÊÇÈç¹ûÓÐ×ÔÔöÖ÷¼üµÄ»°£¬ÄǾÍҪСÐÄÁË¡£
Ïà¹ØÎĵµ£º
ÎÒÏÖÔÚҪʹÓÃSQLite3.0´´½¨Ò»¸öÊý¾Ý¿â£¬È»ºóÔÚÊý¾Ý¿âÖд´½¨Ò»¸ö±í¸ñ¡£
Ê×ÏÈÒªÒýÈëSQLite3.0µÄlib¿â¡£È»ºó°üº¬Í·Îļþ#import <sqlite3.h>
¡¾1¡¿´ò¿ªÊý¾Ý¿â£¬Èç¹ûûÓУ¬ÄÇô´´½¨Ò»¸ö
sqlite3* database_;
-(BOOL) open{
NSArray *paths = NSSearchPathForDirectoriesInDomai ......
package com.jiao.sqlite;
import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widg ......
sqliteʱ¼äº¯Êý£¨×ª£©
2007Äê12ÔÂ10ÈÕ ÐÇÆÚÒ» 13:33
תÌùÔÒò£º×î½üÉè¼ÆÁËÒ»¸ö¿çÊý¾Ý¿âµÄº¯Êý£¬À´²âÊÔ²âÊÔsqlite¡£
SQLite·ÖÒ³ÏÔʾ£ºSelect * from news order by id
desc Limit 10 Offset 10
ÕâÆªÎÄÕÂÊǸù¾Ý SQLite ¹Ù·½ WIKI ÀïµÄÄÚÈÝ·Ò룬Èç¹ûÓÐʲô·Òë²»µ±µÄµØ·½Ï£Íû´ó¼ÒÖ¸³ö£¬±Ï¾¹ÎÒµÄÓ¢ÎÄˮƽʵÔںܲ SQ ......
1£º¶¨Òå±íµÄ½á¹¹ºÍÃû×Ö£¬ÎÒʹÓÃÒÔÏ·½·¨£º
public interface Constatnts extends BaseColumns {
public static final String TABLE_NAME = "test";
public static final String TIME = "time";
public static final String TITLE = "title";
}
ÔÚÕâÀÎҼ̳Р......
ÔÚ AndroidÖУ¬¶ÔÓÚÊý¾ÝµÄ´æÖü£¬Óм¸ÖÖ·½Ê½£¬ÓÐÎļþ·½Ê½£¬ÓÐÎļþʽÊý¾Ý¿â·½Ê½,Android×Ô´øÁËÒ»¸öSQLiteÊý¾Ý¿â£¬×öǶÈ뿪·¢µÄÈ˶ÔÕâ¸ö¿çƽ̨µÄ±¾µØÎļþÊý¾Ý¿âÒ»¶¨²»»áİÉú£¬ÔÚAndroid¶ÔÓÚÊý¾ÝµÄ·ÃÎÊ£¬Ìá³öÁËеķ½Ê½£¬ContentProvider·½Ê½£¬ÀàËÆÓÚMSµÄ ContentProvider·½Ê½µÄ£¬OLEDB£¬¼°ODBCͳһµÄÊý¾Ý·½Ê½¡£
ÎÒÃÇÊ×ÏÈÀ´¿´¿ ......