Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

sqlite dinstincÎÊÌâ

ΪʲôÓÃselect name,distinct phone from phone_book¾Í˵Óï·¨´íÎó£¬
      ÓÃselect distinct phone,name from phone_book¾Í¿ÉÒÔ£¿
ûÓÐΪʲô distinct ÊÇ select µÄÐÞÊηû£¬Ö»ÄÜÔÚ select ºóÖ±½Óд distinct


Èç¹ûÎÒÏëµÃµ½µÄ½á¹ûÊÇname²»Öظ´»òphone²»Öظ´¸ÃÔõô°ì£¿ÄѵÀ²»Ö§³Ö£¿

ÒýÓÃÈç¹ûÎÒÏëµÃµ½µÄ½á¹ûÊÇname²»Öظ´»òphone²»Öظ´¸ÃÔõô°ì£¿ÄѵÀ²»Ö§³Ö£¿


û¿´Ã÷°×£¬½¨ÒéÄã¾ÙÀý˵Ã÷¡£


Ïà¹ØÎÊ´ð£º

SQLITEÏÂÈçºÎɾ³ýÄÚÈÝÖеĵÚÒ»¸ö<br>

SQLITEÏÂÈçºÎɾ³ýÄÚÈÝÖеĵÚÒ»¸ö<br>
SQLITEϲ»ºÃÓà
Ìáʾ: 
sqlite error 
no such function: stuff 
Ôõô½â¾ö?
SQL code:
--------------------------------------------- ......

sqliteÖ®Database is lockedÎÊÌâ

»·¾³£ºQNX 6.3.2
°æ±¾£ºSQLite 2.7.3
ÏÖÏó£ºÔÚÃüÁîÐÐÏÂsqlite½øÈ¥£¬Ö´ÐÐ.table¡¢pragmaÖ®Àà¡¢select¶¼Ìáʾ
 database is locked
Ææ¹ÖµÄÊÇ£¬¼´Ê¹ÊÇд´½¨Ò»¸öÊý¾Ý¿â£¬Ö´ÐÐÉÏÊöÃüÁîÒ²ÊÇÄÇÑù¡£
Áí£ºÔÚһ̨Íê ......

Çë½ÌʹÓÃTree¿Ø¼þºÍSQLiteÊý¾Ý¿âµÄÎÊÌâ

ÎÒÏëÒª½«sqliteÊý¾Ý¿âÖеÄÊý¾Ý£¬ÒÔÊ÷¿Ø¼þµÄÐÎʽ¶Á³ö£¬²¢ÇÒÏÔʾÔÚ¶Ô»°¿òÉÏÃ棬²»ÖªµÀÔõô×ö£¬À´Çë½Ìһϡ£
ps£º¿´µ½ÓÐʹÓÃÊ÷¿Ø¼þºÍaccessµÄ£¬ÀïÃæÓÐÊý¾Ý¿âÒýÇæÀ´Á¬½ÓÊý¾Ý¿âºÍ³ÌÐò£¬ÎÒ²»ÖªµÀSQLiteÈçºÎÓë³ÌÐòÁ¬½ÓÆð ......

Çë½Ì£ºVCÖеÄTree¿Ø¼þÓëSQLiteÊý¾Ý±íµÄʹÓÃÎÊÌâ

ÎÒÒª°ÑÊý¾Ý±íÖеÄÊý¾Ý£¬ÒÔÊ÷µÄÐÎʽÏÔʾÔÚ¶Ô»°¿òÖС£
±ÈÈ磺
Ö»ÒªÊý¾Ý±íÖÐÓÐ3¸ö×ֶΡ¢id¡¢parentid¡¢name
ÇëÎÊÎÒÈçºÎдһЩ´úÂ뽫Êý¾Ý±íÖеÄÄÚÈÝÌîµ½Ê÷¿Ø¼þÖÐÈ¥ 

ÒýÓÃ
Ò»°ãÊÇÓõݹéµÄ·½·¨À´ÊµÏ ......

sqlite ×Ö¶ÎĬÈÏÖµµÈÓÚidÖµ

sqlite ÖÐ
CREATE TABLE table1 (
id integer primary key autoincrement,
name text default '',
[index] integer default ROWID
)

ÓÐûÓÐÀàËƵŦÄÜ£¬Èà index µÄֵĬÈϵÈÓÚid£¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ