且构网

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

如何编写存储过程来使用sql更新员工的出勤率

更新时间:2023-02-05 15:38:12

你似乎要求我们一步一步地完成所有工作。这是为什么 ?为什么你没有采纳我以前的建议来提高效率和可读性?



你的问题毫无意义。你给我们一个select语句(我们写的)并告诉我们你想要更新。你想基于什么更新?你有什么办法吗?



根据你的问题,我想你只想要



insert进入xxxx(其中xxxx是你的表名)







更新xxx设置yyy =(其中xxx是你的表名,yyy是你的专栏。



后跟你发布的SQL,它返回你想要插入的值。



当然,你需要插入你需要传递的其他值,但是现在你的问题太模糊了,无法提供更多信息。
You seem to be asking us to do all your work, one step at a time. Why is that ? Why have you not taken my previous advice on making this more efficient and readable ?

Your question makes no sense. You give us a select statement ( which we wrote ) and tell us you want to update. What do you want to update based on ? What have you done about it ?

Based on your question, I think you just want

insert into xxxx ( where xxxx is your table name )

or

update xxx set yyy = ( where xxx is your table name and yyy is your column )

followed by the SQL you posted, which returns the values you want to insert.

Of course you'd need to insert the other values you need to pass through, but your question is just too vague to give more information, right now.