Answer the question
In order to leave comments, you need to log in
LIMIT and ORDER not working, how to fix?
I enter these commands
BEGIN TRANSACTION;
/* Create a table called NAMES */
CREATE TABLE NAMES(Id integer, Name text);
/* Create few records in this table */
INSERT INTO NAMES VALUES(1,'Tom');
INSERT INTO NAMES VALUES(2,'Lucy');
INSERT INTO NAMES VALUES(3,'Frank');
INSERT INTO NAMES VALUES(4,'Jane');
INSERT INTO NAMES VALUES(4,'HellO!');
INSERT INTO NAMES VALUES(5,'Robert');
COMMIT;
DELETE FROM NAMES WHERE Id = 4 LIMIT 1;
SELECT * FROM NAMES;
1|Tom
2|Lucy
3|Frank
4|Jane
4|HellO!
5|Robert
Error: near line 15: near "LIMIT": syntax error
Answer the question
In order to leave comments, you need to log in
subqueries
DELETE FROM Foo
WHERE someColumn in
(
SELECT someColumn FROM FOO WHERE SomeCondition LIMIT 4
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question