12-09-2009 9:30 PM
Hello
Can someone tell me the basic difference between the above the 2 commands?
Regards,
Srinivas.
12-09-2009 9:45 PM
Hi,
The usage is same, it all depends how you use it.
Regards
Prasenjit
12-09-2009 9:45 PM
Hi,
The usage is same, it all depends how you use it.
Regards
Prasenjit
12-09-2009 10:02 PM
delete from dtab can delete more than one line
delete dtab only deletes one line since it uses the whole primary key
12-09-2009 10:09 PM
12-09-2009 10:15 PM
You can also do F1 on 'DELETE' and find these details in the SAP Keyword Documentation.
You didn't have to cut and paste it - the reference would have been good enough.
Edited by: Rob Burbank on Dec 9, 2009 5:24 PM
12-09-2009 10:18 PM
Let me be more specific
I have table ZTAB which has 100 records.
1. If I say: DELETE FROM ZTAB.
a. Will it wipe out the entire table; all the records along with the keys?
b. Or does it keep the key field and only delete the data for the other fields.
2. If I say: DELETE ZTAB.
a. Again, will it delete all the records in the table.. along with the header line or does CLEAR ZTAB do that?
My question revolves round the key field/s (in case of a composite key). What happens to this column in the table?
Moderator message - You should have been more specific to start with. The question you are asking now is different from the original one. But peple will probably not see this and contineue to answere your original question. So I'm going to lock this. If you still don't have your answer, please start a new thread, but make sure your question is specific.
Edited by: Rob Burbank on Dec 9, 2009 5:25 PM
12-09-2009 10:25 PM
1. The help is very clear. The Where condition is obligatory, delete from ztab would throw a syntax error.
2. delete ztab would delete the record that has the same primary key in the header line. If you want to delete an internal table, you need to use refresh (obsolete) or a clear to the internal table (not the header line of the table).
This is why you should never use header lines. Just adds unnecesary complexity to simple tasks