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:44:39 UTC
Delete limit
Deleting `limit 1` cause any problems ?
<select id="findByAppKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from app_auth
where app_key = #{appKey,jdbcType=VARCHAR}
limit 1
</select><select id="findByAuthIdAndAppName" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from auth_param
where auth_id = #{authId,jdbcType=VARCHAR}
and app_name = #{appName,jdbcType=VARCHAR}
limit 1
</select>
If not Delete , in oracle i will use `rownum =1` replace this
like this : select
<include refid="Base_Column_List"/>
from app_auth
where app_key = #{appKey,jdbcType=VARCHAR}
and rownum = 11. Deleting `limit 1`2. Use `rownum=1` replace `limit 1`please help me to choose 1 or 2
Re: Delete limit
Posted by XiaoYu <xi...@apache.org>.
Ok,
rom1c77 <28...@qq.com.invalid> 于2021年9月22日周三 下午4:44写道:
> Deleting `limit 1` cause any problems ?
> <select id="findByAppKey" parameterType="java.lang.String"
> resultMap="BaseResultMap">
> select
> <include refid="Base_Column_List"/>
> from app_auth
> where app_key = #{appKey,jdbcType=VARCHAR}
> limit 1
> </select><select id="findByAuthIdAndAppName"
> resultMap="BaseResultMap">
> select
> <include refid="Base_Column_List"/>
> from auth_param
> where auth_id = #{authId,jdbcType=VARCHAR}
> and app_name = #{appName,jdbcType=VARCHAR}
> limit 1
> </select>
> If not Delete , in oracle i will use `rownum =1` replace this
> like this : select
> <include refid="Base_Column_List"/>
> from app_auth
> where app_key = #{appKey,jdbcType=VARCHAR}
> and rownum = 11. Deleting `limit 1`2. Use `rownum=1` replace `limit
> 1`please help me to choose 1 or 2