sqliteÊý¾Ý¿â²éѯ±í¿¿Ç°
¸ÕÈëÃÅ ÏëʵÏÖÐÂÎűíÐÂÎÅÖö¥µÄ¹¦ÄÜ
select * from web_news order by id desc limit 0,6
web_news ±íÀïÓÐTOPÁÐ ÔõÑùÈÃTOPÁмǼΪ1µÄΪÖÃǰ ¸÷λ´ó´óÃǰï°ïæ ·Ö²»¶à Çë°üº£¡£¡
order by top²»ÐÐÂð£¿
idºÍtopÄǸöÓÅÏÈ£¿
SQL code:
select * from web_news order by top!=1 ,id desc limit 0,6;
ÄãµÄÒâ˼ÊDz»ÊÇtop=1µÄÊÇÖö¥µÄÄØ£¿
SELECT * from web_news ORDER BY `topid` DESC LIMIT 0 , 6
²¹³äһϣ¡
ÄãµÄÒâ˼ÊDz»ÊÇtop=1µÄÊÇÖö¥top=0µÄ²»Öö¥µÄÄØ£¿
SELECT * from web_news ORDER BY 'top' DESC LIMIT 0 , 6
THANK YOU ½â¾öÁË!
Ïà¹ØÎÊ´ð£º
ÎÒÓÃsqliteadmin½¨ÁËÒ»¸öÊý¾Ý¿âtest.sdb,¿ÉÊÇÔõôҲ´ò²»¿ªÌáʾÈçÏ´íÎó£ºFile opened that is not a database file
file is encrypted or is not a database¡£
ÎÒµÄÁ¬½Ó×Ö·û´®ÈçÏÂÂ¥ÉϵĿɲ»¿ÉÒÔ°ïÎÒ¿´¿´
S ......
³ÌÐò´úÂëÈçÏ£º
sqlTime = "select SUM(onlineTimeSpan) from T_OnlineTimeSum where ipAddress = :a AND onlineDate BETWEEN :b AND :c";
  ......
sqliteµÄ¿ÕÖµ²éѯÔõôд,ÄÜÕߵ÷Ö
select * from tt where f1 is null
select * from yourTable where col is null;
SQL code:
sqlite> create table Aoqun (id int primary key,col1 int);
sqlite> ......
SqlServerÖÐÕâÑùͳ¼Æ:
select name from sysobjects where xtype='U'
ÒªÖªµÀ×ÜÊýµÄ»°¾Í¼òµ¥ÁË£º
select count(*) from sysobjects where xtype='U'
OracleÖÐÕâÑù²éѯ£º
Sele ......
ÎÒÒª°ÑÊý¾Ý±íÖеÄÊý¾Ý£¬ÒÔÊ÷µÄÐÎʽÏÔʾÔÚ¶Ô»°¿òÖС£
±ÈÈ磺
Ö»ÒªÊý¾Ý±íÖÐÓÐ3¸ö×ֶΡ¢id¡¢parentid¡¢name
ÇëÎÊÎÒÈçºÎдһЩ´úÂ뽫Êý¾Ý±íÖеÄÄÚÈÝÌîµ½Ê÷¿Ø¼þÖÐÈ¥
ÒýÓÃ
Ò»°ãÊÇÓõݹéµÄ·½·¨À´ÊµÏ ......