Oracle 参数 与 SQL Server 区别

时间:2022-05-31 00:36:10

Oracle:

privateconststring SQL_SELECT_EVENTBYNAME ="SELECT * FROM UTACCIES_UPLOAD_EVENT WHERE EVENTNAME = :EVENTNAME";

 

privateconststring PARM_EVENT_NAME =@"EVENTNAME";

 

 

Sql Server:

 

privateconststring SQL_SELECT_EVENTBYNAME ="SELECT * FROM UTACCIES_UPLOAD_EVENT WHERE EVENTNAME = @EVENTNAME";

 

privateconststring PARM_EVENT_NAME ="@EVENTNAME";

 

 

注意:在oracle中,sql语句中,参数之前要用 ':' (冒号), 在定义参数时, @要放在引号之外

在Sql server, sql语句中,参数之前要用'@', 在定义参数时, @要放在引号之内