You hava an error in your SQL syntax ; check the manual that corresponds to your MySQL server for the right
syntax to use near '2 * from use_table) t' at line 1SQL code: mysql ÀïÃæ¿ÉÒÔÕâÑùдô£¿£¿²»¶®£¬°ï¶¥... delete t from (select top 2 * from use_table) t
delete t from t where ¹Ø¼ü×Ö in (select top 2 ¹Ø¼ü×Ö from use_table) ÎÒµÄmysql-5.0.22-win32ÀïÊÔÁË£¬Ã»ÓÐÕâ¸öÓï·¨ SQL code: delete from ±íÃû where Ìõ¼þ in (select top 2 Ìõ¼þ from ±íÃû )
code=SQL]delete from use_table limit 2;[[/code] {{
String sqlCount="select count(*) from usertable where username='"+ userName+"'";Õâ¾ä»° ʲôÒâ˼°¡£¡ Õâ¾ä»°Êä³ö³öÀ´¾ÍÊÇ select count(*) from usertable where username='ÄãµÄ±äÁ¿ ......
Çó¸övbÖеÄsqlÓï¾äµÄд·¨£¬´ÎsqlÓï¾äµÄÓ÷¨ÊÇ·ÖÒ³³ÌÐò ÎÒдµÄÈçÏ£ºÆäÖÐAÊÇÓÃÀ´½ÓÊÕÿҳÏÔʾµÄ¼Ç¼µÄÌõÊý£¬BÊÇÓÃÀ´½ÓÊÕÏÔʾµÄµ±Ç°µÄÒ³Ãæ. sqltext="select top A * from log where id not in(select top ( ......