Create Table Syntax Error - MS Access, SQL view

前端 未结 4 2001
星月不相逢
星月不相逢 2021-01-25 03:15

I keep getting CREATE TABLE Syntax Error, but I don\'t see the error! What is causing the error?

My SQL:

CREATE TABLE my_employee
(
e         


        
4条回答
  •  余生分开走
    2021-01-25 03:54

    As HansUp said: "default" in DDL doesn't work here. As an alternative you can create the table without the default first and add the default via the TableDef afterwards:

    CurrentDb().Execute "create table my_employee ..."
    CurrentDb().TableDefs("my_employee").Fields("salary").DefaultValue = 15000
    

提交回复
热议问题