如何使用存储过程传递Getdate [英] how to pass the Getdate using Store Procedure

查看:400
本文介绍了如何使用存储过程传递Getdate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用商店程序通过Getdate



请帮帮我。



Rgds,

Narasiman P.

how to pass Getdate using store procedure

please help me.

Rgds,
Narasiman P.

推荐答案

嗨Narasiman,

你也可以在SQL中使用getdate函数,不需要传递通过C#代码。

请详细解释您的查询..
Hi Narasiman,
You can use getdate funcation in SQL also, No need to pass through C# Code.
Please explain your query in Detail..


Hello Narasiman,是的,您可以直接在SQL Store过程中使用getdate()函数。



但我们希望通过传递参数传递getdate(),然后首先进行选择查询,例如



选择getdate()作为date1,



并将此值存储在任何datetime变量中,并在需要的地方使用。
Hello Narasiman, yes you can directly use getdate() function in SQL Store procedure.

but we want to pass getdate() through pass through parameters, then first u make select query like

select getdate() as date1 ,

and store this value in any datetime variable and use this where u want.


Hi


您可以在查询(后端)中使用getdate()进行插入,删除或更新。你不需要从前端调用它。



或用你的代码块来改善你的问题。
Hi
You can use getdate() in your query (in back end) itself for insert, delete or update. You need not to call it from Front end.

or improve your question with your code block.


这篇关于如何使用存储过程传递Getdate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆