在MS-Access 2007数据库中设置默认值 [英] Set Default Value in MS-Access 2007 Database
本文介绍了在MS-Access 2007数据库中设置默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经安装了ms-office2007.但是我在以下查询中运行此命令:-
I have installed ms-office 2007. But I running this below query:-
CREATE TABLE Persons
(
P_Id int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255) DEFAULT 'Sandnes'
)
尚未解决此查询. DEFAULT关键字中的语法错误.
请帮助我..
Yet not working this query. Syntax error in DEFAULT keyword..
Please helps me..
推荐答案
您应删除这样的单引号
You should remove the single quotation marks like this
City varchar(255) DEFAULT Sandnes
Take a look at this page How to modify a table''s design using Access SQL[^]
Hope this helps
这篇关于在MS-Access 2007数据库中设置默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文