DELETE command

Database
Enthusiast

DELETE command

Hi,

I have a table with 20 million records. I need to delete 10 million records out of the 20 million records. I dont have any key columns in the table.Can anyone please tell me the command to delete 10 millions records.  Like in oracle we have rowid column in the backend, is there any similar type of column in teradata  or please let me know anyother possible way to delete the records.

Thanks in advance!

1 REPLY
Enthusiast

Re: DELETE command

There is a similar topic where dnoeth has answerd this question. the URL is as follows:

http://forums.teradata.com/forum/database/delete-xxx-rows-with-teradata

You can use this query with the following modification, replace the 10 after sample with .5 and your 50% rows will be deleted! e.g.

delete from tab
where PK_col in
(select * from (select PK_col from tab sample .5) dt)
Khurram