------------------ ???????? ------------------
??????:                                                                         
                                               "dev"                            
                                                        <[email protected]&gt;;
????????:&nbsp;2021??9??22??(??????) ????4:48
??????:&nbsp;"dev"<[email protected]&gt;;

????:&nbsp;Re: Delete limit



Ok,

rom1c77 <[email protected]&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

Reply via email to