-
data range
I need to delete a range of items from 001-099 on a table. I don't want to delete it one-by-one because it will take almost an hour. What will I add to the following statement:
delete table
where itemno = '001'
-
delete table
where itemno >= '001' and itemno <='099'
-
create table x111 (itemno varchar(7),name varchar(100))
insert into x111 select '001','aw'
insert into x111 select '002','ae'
insert into x111 select '003','re'
insert into x111 select '004','ee'
insert into x111 select '005','e'
insert into x111 select '021','w'
insert into x111 select '091','e'
insert into x111 select '111','t'
insert into x111 select '121','g'
insert into x111 select '241','v'
select * from x111
delete from x111 where convert(int,itemno) >=1 and
convert(int,itemno) <=99
select * from x111
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|