Need some Basic SQL Help for selecting a range

Good Morning,

This is my first post so hopefully I'm doing it right.

I need to remove a group of lines so from 10 to 50, at the moment I'm doing it line by line or have to enter each line number and add a ,

See example:

DELETE FROM TRNLN
WHERE TID = '1003004';

DELETE FROM TRNLN
WHERE TID in (3046856,3046857,3046858,3046859,3046860,3046861,3046862);

I cant work out how to do something like:

DELETE FROM TRNLN
WHERE TID in (10190 to 10200);

Thanks you in advance for any help on this as I've got hundreds of lines to remove.

Finery worked it out my self.

Thanks for all the input, I wont be back.

I guess you did something like this?

DELETE FROM TRNLN
WHERE TID >= 10190
AND TID <= 10200

Sorry no one got back to you in time, this forum can be a bit busy.

I think you were looking for BETWEEN.

8 days ago you posted this? I've reviewed several times and did not see this post.

1 Like