ÈçºÎÔÚsqliteÖÐɾ³ýÇ°NÌõ¼Ç¼
ûÓÐÖ÷¼ü£¬ÎÒֻҪɾ³ýÇ°NÌõ¼Ç¼¡£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ÁÐ
SQL code:
delete from tb where id in (select top n id from tb)
ms²»Ðа¡£¬ÄÇλ´ó´ó¸ø³öÏêϸµãµÄ´úÂë
ÔÚÏßµÈ
SQL code:
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 A,B,C,D..... from #T
SQL code
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.
Ïà¹ØÎÊ´ð£º
SQLITEÏÂÈçºÎɾ³ýÄÚÈÝÖеĵÚÒ»¸ö<br>
SQLITEϲ»ºÃÓÃ
Ìáʾ:
sqlite error
no such function: stuff
Ôõô½â¾ö?
SQL code:
--------------------------------------------- ......
ÎÒÏëÒª½«sqliteÊý¾Ý¿âÖеÄÊý¾Ý£¬ÒÔÊ÷¿Ø¼þµÄÐÎʽ¶Á³ö£¬²¢ÇÒÏÔʾÔÚ¶Ô»°¿òÉÏÃ棬²»ÖªµÀÔõô×ö£¬À´Çë½Ìһϡ£
ps£º¿´µ½ÓÐʹÓÃÊ÷¿Ø¼þºÍaccessµÄ£¬ÀïÃæÓÐÊý¾Ý¿âÒýÇæÀ´Á¬½ÓÊý¾Ý¿âºÍ³ÌÐò£¬ÎÒ²»ÖªµÀSQLiteÈçºÎÓë³ÌÐòÁ¬½ÓÆð ......
GUID£º0C3EDEE8-B14F-4220-8D64-990E00D84AF7
SELECT fldGuid, fldName, fldUserGuid from table
Äܲéѯ fldUserGuid Ϊ£º0C3EDEE8-B14F-4220-8D64-990E00D84AF7 µÄÊý¾ÝÒ»Ìõ
SELECT fldGuid, fldN ......
ÓÃevc±àдӦÓóÌÐò£¬¿ª·¢Êý¾Ý¿â¹ÜÀíϵͳ¡£ÉèÖÃencodingΪUTF-8£¬Äܹ»²åÈëÖÐÎÄÊý¾Ý£¬ÓÃSQLite Expert Personal¿´Êý¾Ý¿â£¬ÖÐÎÄÕý³£¡£±ðµÄ³ÌÐò²éѯÊý¾Ý¿â£¬²¢ÏÔʾÓÚEDIT¿Ø¼þÖУ¬Õý³£¡£µ«ÊÇʹÓÃlist control ¿Ø¼ ......
±ÈÈ磺
1¡¢Á¬½ÓÊý¾Ý¿â£»
2¡¢½¨±í£¬insert ¡¢update,delete,selectÈçºÎд£¿
ÊDz»ÊÇÒªÏÂÔØ ADO.NET 2.0 ÒýÇ棿
sqliteʹÓÃÊÖ²á
ллqshurufa£¬ÎÒÏëÖªµÀÈçºÎͨ¹ývb.netʵÏÖ£¬¾ÍÊÇÓï¾äզд£¿
Dim Conn As New ......