SQL批量增加表的字段时 因为括号位置不对出现的问题

ALTER table user  add
(
    id nvarchar2 (50) ,
	name nvarchar2 (50) ,
	age number(3)) ,
    address nvarchar2 (100);

这个SQL是向用户表user中添加id,name,age,address字段。

但是因为age字段后面多了一个括号,导致数据库执行器认为这个SQL已经结束了,于是只向User表中加了id,name,age这三个字段,并没有加address字段。

最关键的是  这种SQL执行的时候  并不会报错。

你可能感兴趣的:(DataBase,数据库,mysql,sql)