put the truncate line from your second version into your first version and then it should work

the create table statement is plain wrong as it already exists