You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shenyu.apache.org by rom1c77 <28...@qq.com.INVALID> on 2021/09/22 08:50:03 UTC

回复: Delete limit

------------------ 原始邮件 ------------------
发件人:                                                                                                                        "dev"                                                                                    <xiaoyu@apache.org&gt;;
发送时间:&nbsp;2021年9月22日(星期三) 下午4:48
收件人:&nbsp;"dev"<dev@shenyu.apache.org&gt;;

主题:&nbsp;Re: Delete limit



Ok,

rom1c77 <280385556@qq.com.invalid&gt; 于2021年9月22日周三 下午4:44写道:

&gt; Deleting&amp;nbsp;`limit 1`&amp;nbsp;cause any problems&amp;nbsp;?&amp;nbsp;
&gt; <select id="findByAppKey" parameterType="java.lang.String"
&gt; resultMap="BaseResultMap"&amp;gt;
&gt;&nbsp;&nbsp; &nbsp; select
&gt;&nbsp;&nbsp; &nbsp; <include refid="Base_Column_List"/&amp;gt;
&gt;&nbsp;&nbsp; &nbsp; from app_auth
&gt;&nbsp;&nbsp; &nbsp; where app_key = #{appKey,jdbcType=VARCHAR}
&gt;&nbsp;&nbsp; &nbsp; limit 1
&gt; </select&amp;gt;<select id="findByAuthIdAndAppName"
&gt; resultMap="BaseResultMap"&amp;gt;
&gt;&nbsp;&nbsp; &nbsp; select
&gt;&nbsp;&nbsp; &nbsp; <include refid="Base_Column_List"/&amp;gt;
&gt;&nbsp;&nbsp; &nbsp; from auth_param
&gt;&nbsp;&nbsp; &nbsp; where auth_id = #{authId,jdbcType=VARCHAR}
&gt;&nbsp;&nbsp; &nbsp; and app_name = #{appName,jdbcType=VARCHAR}
&gt;&nbsp;&nbsp; &nbsp; limit 1
&gt; </select&amp;gt;
&gt; If not Delete , in oracle i will use `rownum =1` &amp;nbsp;replace this
&gt; like this :&nbsp; &nbsp; select
&gt;&nbsp;&nbsp; &nbsp; <include refid="Base_Column_List"/&amp;gt;
&gt;&nbsp;&nbsp; &nbsp; from app_auth
&gt;&nbsp;&nbsp; &nbsp; where app_key = #{appKey,jdbcType=VARCHAR}
&gt;&nbsp;&nbsp; &nbsp; and rownum = 11. Deleting `limit 1`2. Use `rownum=1` replace `limit
&gt; 1`please help me to choose 1 or 2