Created
March 8, 2019 11:27
-
-
Save lihongjie0209/eb3c53cc504b10746fe5171a5ccb28b1 to your computer and use it in GitHub Desktop.
mybatis_sql_templete
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select id="empFind" resultType="employee"> | |
SELECT * FROM EMP | |
WHERE 1=1 | |
<choose> | |
<when test="sal >= 5000"> | |
and job ='PRESIDENT' | |
</when> | |
<when test="sal >=3000"> | |
and job ='manager' | |
</when> | |
<when test="sal >=2000"> | |
and job='ANALYST' | |
</when> | |
<otherwise> | |
and job in('clerk','salesman') | |
</otherwise> | |
</choose> | |
</select> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment