Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : Sqlite

SQLiteÖ´ÐÐSQL³öÏÖIOÒì³£

Mobile6  SQLite°æ±¾1.0.65,Êý¾ÝÁ¬½ÓûÎÊÌâ.¿ÉÒÔÖ´Ðвéѯ²Ù×÷.µ«ÊǸüлòÐÞ¸Äʱ¾Í»áÅ׳öSome kind of disk I/O error occurred
disk I/O errorÒì³£,ÇëÖªµÀÕâ¸öÎÊÌâµÄ¸ßÊÖ½â¶ÁÏÂ.²»Ê¤¸Ð¼¤.


sql= Update  TELE_TASKDATA_POI SET X=0.672433519117736,Y=0.89950975677907,STATE=1 where id='2006 ......

Sqlite·µ»Ø¶à½á¹û¼¯ÎÊÌâ

Sqlite·µ»Ø¶à¸ö²éѯ½á¹û¼¯µÄʱºò£¬ÓÐʲô°ì·¨ÄÜÒƶ¯µ½ÏÂÒ»¸ö½á¹û¼¯ÉÏÈ¥
±ÈÈç
ÓÐÓï¾ä
select * from sqlite_master where type='table';select * from sqlite_master where type='index';
Õâ¸öÓï¾äÖ´ÐÐÆðÀ´£¬¾Í»á·µ»ØÁ½¸ö½á¹û¼¯
ÇëÎÊÓÐûÓÐÌṩAPIº¯ÊýÔÚÁ½¸ö½á¹û¼¯Çл»µÄ£¿


ÒýÓÃ
Ö ......

sqlite »ñÈ¡×î½üÉúÈÕÓû§µÄ·½·¨£¿

1¡¢juliandayÕâ¸öº¯ÊýÖ»ÓдøÉÏÄê·Ý¼ÆËã²Å¿É¿¿£»
2¡¢ÎÒÄ¿Ç°Óõķ½·¨SELECT £¨jolianday(¡®now¡¯)-jolianday(¡®1981-12-23¡¯)£©%365
3¡¢Õâ¸ö·½·¨¿Ï¶¨ÓÐÎÊÌ⣬µ«ÊµÔÚ²»ÖªµÀÔõôʵÏÖ£»
Òò´ËÏ£Íû¸÷λÈÊÐÖ°ï°ï棡

ûÄ겿·ÖÔõôÅжÏÔ¶½ü
1.2 2.3 ÄĸöÈÕ×ÓÀëÏÖÔÚ10.8±È½Ï½ü£¿ 1.2¿ÉÄÜÊÇ2000 2.3¿ÉÄÜÊÇ1998µÄ
......

SQLITE²åÈëÓï¾ä´íÎó

SQL code:

IF NOT EXISTS(SELECT * from Company WHERE MAC='aa:22:cc:22:ee:ff')
INSERT INTO Company(Mac,CompanyId,CompanyName,FtpParameter) Values('aa:22:cc:22:ee:ff','00101','aabbcc','192.168.123.11|21|abc|abc')


ΪʲôÌáʾ£º
......

sqliteÊý¾Ý¿â¼àÊÓÎÊÌâ(´¥·¢Æ÷?)

SQL´¥·¢Æ÷¿ÉÒÔµ÷ÓÃÍⲿ³ÌÐò£¬sqlite¿ÉÒÔÂð£¿Èç¹ûÏë¼àÊÓÊý¾Ý¿âijһÕűíµÄijһÏîµÄ¸Ä±ä¸ÃÔõô×ö£¿Óô¥·¢Æ÷»¹ÊÇÆäËûʲô·½·¨£¿
Èç¹ûÑ¡ÔñÓô¥·¢Æ÷¸Ã´úÂë¸ÃÔõôд£¿Çë¸ø³ö˼·»ò´úÂ룬ÆäËû»¹ÓÐʲô·½·¨¿ÉÒÔ¼àÊÓÊý¾Ý¿â±ä»¯£¿ ......

ÈçºÎÔÚsqliteÖÐɾ³ýÇ°NÌõ¼Ç¼

ûÓÐÖ÷¼ü£¬ÎÒֻҪɾ³ýÇ°NÌõ¼Ç¼¡£nÊýÖµ´ó¸ÅÔÚǧÍò¼¶±ðµÄ¡£
ÓÃset rowcount n

ÒýÓÃ
ÓÃset rowcount n


Ö§³Ö

SELECT IDD=IDENTITY(INT,1,1),* INTO #T from TB

DELETE #T WHERE IDD NOT IN (SELECT TOP N IDD from #T)

DROP TABLE TB

INSERT TB SELECT * from #T

È¥³ýIDDÁ ......
×ܼǼÊý:85; ×ÜÒ³Êý:15; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [6] [7] [8] [9] [10] [11] [12] [13] 14 [15]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ