I found out the mistake. Two different sql statements have overlapped.

wrong

)create table.....


right
)
create table.....


But I dont know how the script was made wrong as I got it from the already existing table.