Leo Lin's Blog
  • Home
  • Archives
  • About
  • Ask Me
Word of Forks
Home Archives About Ask Me

如果資料不存在才插入

3月 5, 2019
MySql
1
2
3
4
5
insert into proposal_label (name)
select * from (select label_name) AS tmp
where not exists (
select id from proposal_label where name = label_name
) limit 1;
Read More
insert
Leo Lin
很愛打羽球,大家快找我打羽球!

想更了解我?
Links
  • GitHub
  • Tumblr
Categories
  • AWS
    1
  • Angular
    12
  • CSS
    1
  • Firebase
    1
  • Git
    6
  • Google
    1
  • Hexo
    4
  • Javascript
    3
  • Markdown
    2
  • MySql
    14
  • Nginx
    4
  • Nodejs
    3
  • Npm
    1
  • OSX
    3
  • Rxjs
    3
  • TBD
    1
  • Ubuntu
    7
  • Visual Studio Code
    4
  • Web
    1
  • angular
    1
  • 使用者體驗
    1
  • 工作筆記
    3
  • 日記
    24
  • 羽球日記
    5
  • 讀書筆記
    1
Tags
403 Angular Blog Firebase Github Godaddy Google Ionic JSON Mysql Proxy SSH Test VPN Virtual Box Vultr access angualr angular array async autocomplete await branch cherry-pick chrome chrome devTool date datetime declare variable deploy escape exception export filter function i18n insert internationalization log map merge migration plugin pm2 prerouting procedure prodecure remote shortcut snippet source map store procedure timestamp timezone tomcat transaction vscode vultr xlf 偽善 匯出 多國語系 大阪 奈良 宣告變數 成人世界 杭州 江林 玉山銀行 結腸性潰瘍 網站測試工具 讀書筆記 責任 跳脫字元 醫保 重啟咲良田 離職 電信 電影 預儲程序
Theme MaterialFlow designed by Kevin Tan.