Created
February 5, 2018 05:52
-
-
Save seahrh/6bccd6f510290d30122bd97cd6f68bbd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use mydb; | |
set @s='pqrs'; | |
set @d=11.11; | |
set @pk=15605; | |
INSERT INTO t1 (s,d,_fk) SELECT * FROM (SELECT @s, @d, @pk) AS tmp | |
WHERE NOT EXISTS (SELECT s FROM t1 WHERE s=@s and _fk=@pk) LIMIT 1; | |
commit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment