如何在表格中添加更新的时间列 [英] how to add updated time column in table
问题描述
你好朋友,
我的桌子下面有列
1.admin_id int
2.admin_name varchar(50),
3.密码nvarchar(max),
4.重新输入密码nvarchar(max),
5.admin_type varchar(20)
6.branch varchar(20)
7.createddateandtime日期
以上属性足以创建管理员.但是我想基于admin_id更新现有的详细信息,并且需要存储更新日期和时间.如何存储更新日期和时间.请帮助我.
Hello friends,
i have table with below columns
1.admin_id int
2.admin_name varchar(50),
3.password nvarchar(max),
4.Repassword nvarchar(max),
5.admin_type varchar(20)
6.branch varchar(20)
7.createddateandtime date
The above attributes enough for admin creation.but i want to upadate existing details based on admin_id and updation date and time need to be store.how to store update date and time. please help me.
推荐答案
再向您的表中添加一个名称为UpdatedDateAndTime的同伴.每次更新事件时,只需更新列值即可.
Add one more coulmn to your table with the name of UpdatedDateAndTime. On every update event just update the column value.
这篇关于如何在表格中添加更新的时间列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!