Hi. I created a table in base, as a beginner I made some mistakes while adding fields but managed to edit or delete the wrong fields. At some point I added a boolean field but mistakenly selected the type VARBINARY. Now I cant delete this field nor can I change its type. Is there a way to edit this table to remove the VARBINARY or I just spoiled it and I need to delete the entire table and start all over again? When I delete the VARBINARY field and try to save the table I get a “ERROR WHILE SAVING THE TABLE DESIGN - The column could not be deleted”
menu:Tools>SQL…
ALTER TABLE "T" ADD COLUMN "B" BOOLEAN BEFORE "X";
ALTER TABLE "T" DROP COLUMN "X";
where “T” is the table name, “X” is the column to be deleted and “B” is the new boolean column.
After closing the dialog, call menu:View>Refresh Tables and see the result.
If the boolean column should be True/False but not Null with False as default value:
UPDATE "T" SET "B" = False;
ALTER TABLE "T" ALTER COLUMN "B" SET DEFAULT False;
Again, menu:View>Refresh Tables
Perfect! Worked like a charm. Thank you.