sql中如何设置一个字段为当前时间(带年月日小时分)

2025-03-10 17:59:35
推荐回答(1个)
回答1:

用默认值取getdate()即可,如:

create table tb_name (dt datetime default getdate())