🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.database
Article #293

Re: ��� ��ݿ��insert

#293
From: Galaxy��VOLUNTEERS��Database
Date: Sat, 04 Jul 2009 12:52
20 lines
2083 bytes
���GJ
�� �� cenalulu (cenalulu) �Ĵ������ᵽ: ��
: mysql��on duplicate key�IJ���
: http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html
: �Ȱ���Ҫ��Ҫ�жϵļ���col����һ��unique key��
: Ȼ��
: insert into tbl_name values(1,2,3) on duplicate key update count=count+1;
: �� �� holycai �Ĵ������ᵽ: ��
: : ������Ҫ�Ѻܶ������insert ������ݿ⣺�����������Ŀ������ͬ���������..
: : �Ѿ����ڣ�������ݿ����Ŀ�ϵ�count�ֶ�+1������insert һ���µĽ�����ݿ⡣
: : ����ÿ�μ���Ŀǰ��Ҫ����������е�������ж��Ƿ��Ѿ����ڣ�����ӵ����Խ��..
: : ʱ������ٶ�Խ��Խ��������û��ʲô�취��������ٶȣ����߲���Ҫ���������..
: .................������ʡ�ԣ�

--
Welcome to Database Board
��ӭ������ݿ��
http://bbs.sjtu.edu.cn/bbsdoc?board=database

�� ��Դ:����ˮ˼Դ bbs.sjtu.edu.cn��[FROM: 124.79.146.211]
Technical Details
Message-ID: <4gf3T8$bOY@bbs.sjtu.edu.cn>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.isoc.lu!news.shec6.edu.cn!SJTU

Show Full Headers
Complete Article Headers
X-Google-Thread: 4df683fd51,7e06d208d1c198c7,start
X-Google-Attributes: gid4df683fd51,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: Chinese,GB
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.isoc.lu!news.shec6.edu.cn!SJTU
From: Dem.bbs@bbs.sjtu.edu.cn (Galaxy��VOLUNTEERS��Database)
Newsgroups: cn.bbs.comp.database
Subject: Re: ���  ��ݿ��insert
Date: 04 Jul 2009 12:52:31 GMT
Organization: ��ˮ˼Դ
Message-ID: <4gf3T8$bOY@bbs.sjtu.edu.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: database/M.1246711928.A
Lines: 20