且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

主键和主键约束之间的区别

更新时间:2023-01-14 19:13:46

几乎没有区别。在您明确声明约束的情况下,您可以根据需要为其命名。只定义主键可以获得自动名称(取决于数据库)。
There is almost no difference. In the case where you explicitly state constraint you can name it however you want. Defining just primary key gets you automatic name (depending on the database).