Yup, same in Denmark. It’s called “fritstilling” - basically they pay you severance equally to the amount of months you should have gotten advanced notice (3-many months).
But there has to be a very good reason. Such as theft, or actual security worries.