mysql

一、在linux下設置不區分大小寫html

  修改 Linux 上的 MySQL 的配置文件 /etc/my.cnf ,在[mysqld]下面添加一行配置,即 lower_case_table_names=1 ,而後 service mysqld restart 重啓數據庫。mysql

二、有則更新無則插入 linux

INSERT INTO T_USER(userid,name,sex) VALUES (id,username,usersex) ON DUPLICATE KEY UPDATE name=username,sex=usersex; 
----

INSERT INTO bonus_card_info
(term_id,term_address,term_link_name,term_link_phone,term_card_id_card,term_card_no,term_card_name,band_code,point_type)
VALUE('0371011001','鄭州市二七區','張三2','12312341234','410785410212355214','62226215421235','大傻','1','1')
ON DUPLICATE KEY UPDATE
term_address='鄭州市二七區' ,term_link_name='張三2',term_link_phone='12312341234',
term_card_id_card='410785410212355214',term_card_no='62226215421235',term_card_name='大傻',
band_code='1',point_type='1' sql

    注意:若是在Mysql中使用這種形式,則要求在數據表中userid字段必須是主鍵或創建了惟一的索引數據庫

三、----rest

相關文章
相關標籤/搜索