insert DEFAULT values

百般思念 提交于 2019-12-04 23:52:05

It's exactly the same thing. No need to pick one instead of the other.

Usually default keyword is handy when you have computer-generated code. It makes life easier to just use every single column in the insert clause and just use default when you don't have a specific value for certain column.

Other than that, as I said, it's the same.

INSERT INTO distributors (dname) VALUES ('XYZ Widgets');

This is fine, you do not need to specify a field if you want its default value being saved, provided a default is set.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!