这是我的sql语句来实现查询。
insert into courses(course_id,course_name,courses)
values (1,"bet","3")
where not exists(25,"admin","it")
答案 0 :(得分:1)
您必须使用SELECT
查询。
INSERT INTO courses (course_id, course_name, courses)
SELECT 1, "bet", "3"
FROM DUAL
WHERE NOT EXISTS (
SELECT 1 FROM courses
WHERE course_id = 25 AND course_name = "admin" AND courses = "it"
)