You're right, you cannot run truncate table on an table which uses an foreign key. But you can run a normal delete on the table itself.
The only thing you should take care of is the order.
For example:
You have a table users
and a table users_log
where you store all users logins.
You cannot run the delete on the users
table if still rows from users_log
referencing them.
If you delete all rows from users_log
and afterwards deleting the rows from users
everything should be fine.
In this particular example, this code will work:
DELETE FROM users_log
DELETE FROM users
While this won work:
DELETE FROM users
DELETE FROM users_log -- which has a foreign key constraint on users