W
W
wz2021-07-26 01:04:32
SQL Server
wz, 2021-07-26 01:04:32

Removing column values ​​from number to number?

The accounts table and it also has columns: accountID and userName:

<b>userName       accountID</b>
Alan               1000
Josef               1001
Josef               1002
Josef               1003
Josef               1004
Josef               1005

How to write a query that would delete accounts with accountID from 1001 to 1005

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Slava Rozhnev, 2021-07-26
@rensly

Elementary:

delete from users where accountID between 1001 and 1005;

MS SQL fiddle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question