mysql²éѯ--35·Ö
mysql ÖÐÒ»¸ö±íÖÐ×Ö¶ÎÈçÏÂ: id value create_time Èý¸ö×Ö¶Î
ÈçÊý¾ÝÓÐ:
1 test1 2009-9-10
1 test2 2009-9-11
2 testg 2009-9-10
3 testu 2009-9-11
3 testn 2009-9-10
ÎÒÒªÏëµÃµ½µÄ½á¹ûÊǵ±idÏàͬʱ£¬Ö»È¡create_timeΪ×î´óµÄÒ»ÌõÊý¾Ý£¬ÕâÑùÈ¡µÃ½á¹û»áÊÇ
1 test2 2009-9-11
2 testg 2009-9-10
3 testu 2009-9-11
ÇëÎÊÕâ¸ösqlÓï¾äÓ¦¸ÃÔõôд?
ËÏȸø³öÕýÈ·Óï¾ä£¬·ÖÈ«¸øËû......¼±ÓÃÖÐ
°ïµ½Ä㶥Ï¡£¡£ºÇºÇ¡£
SQL code:
1¡¢²éÕÒ±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö×ֶΣ¨peopleId£©À´ÅжÏ
select * from people
where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)
Àý¶þ£º
select * from testtable
where numeber in (select number from people group by number having count(number) > 1 )
¿ÉÒÔ²é³ötesttable±íÖÐnumberÏàͬµÄ¼Ç¼
2¡¢É¾³ý±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö×ֶΣ¨peopleId£©À´Åжϣ¬Ö»ÁôÓÐrowid×îСµÄ¼Ç¼
delete from people
where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)
and rowid not in (select min(rowid) from people group by peopleId having count(peopleId )>1)
3¡¢²éÕÒ±íÖжàÓàµÄÖظ´¼Ç¼£¨¶à¸ö×ֶΣ©
select * from vitae a
where (a.peopleId,a.seq) in (sele
Ïà¹ØÎÊ´ð£º
ÎÒÊÇÓÃmysql×Ô´øµÄC API
if(mysql_real_connect(&mysql,"125.0.0.108","root","root","home",3306,NULL,0))
{
AfxMessageBox("Êý¾Ý¿âÁ¬½Óʧ°Ü") ......
Winform+MySQL×öÏîÄ¿£¬ÔÚ×¢ÖØÐÔÄܵÄÇé¿öÏ£¬ÎÒ¸ÃÈçºÎÈ¥Íê³ÉÕâÀàÐ͵ÄÏîÄ¿ÄØ£¡
Çë¸÷λ¸øÒÔÌáʾ¡£
ÄãÕâ¸ö·¶Î§Ì«¹ãÁË£¬ÎÒ˵2µãÖØÒªµÄ°É
1.WINFORM³ÌÐòÊǵ¥¶ÀÔËÐеÄCS³ÌÐò£¬ºÍBS²»Í¬£¬BSµÄѹÁ¦Ê¼ÖÕ¶¼ÔÚSERVERÉϵģ¬¶ÔC ......
select id,dtime,zt,optype( Èç¹ûoptype=0½«±¾ÌõÊý¾Ý²åÈëµ½table1±íÖУ¬Èç¹ûoptype=1ÒÔdtimeºÍztΪÌõ¼þÖ´ÐÐÒ»Ìõ²éѯÓï¾ä ) from table
ʵÏÖÕâ¸öÒªÇóµÄÓï·¨Ôõôд
Ò»ÌõSQLÓï¾ä¹À¼Æ¸ã²»¶¨¡£µÈ¥Ϻ÷½·¨£¡
Èç¹ ......
linuxϵͳ ÔÀ´×Ô´ømysqlÒѾжÔØ ÐÂװа汾 °²×°Ê±Ìáʾ unpacking of archive failed on file usr/bin/ replace 4acebledle4d:cpio :read ÇëÎÊÊÇʲôÎÊÌâ
ÒýÓÃ
ÎļþÊÇÖ»¶ÁµÄ ¸ü¸ÄϸÃĿ¼ȨÏÞΪ ......
ÎÒÒÔÇ°°²×°ÁËÒ»´Î£¬ºóÀ´Ð¶ÔØÁË£¬ÏÖÔÚÔÙ°²×°µÄʱºò£¬Ìáʾ´íÎó£ºError 1305.Error reading from file C:DOCUME~1\LOCALS~1\Temp\mysql_server.msi.Verify that the file exists and that you can access it.
¿ ......