Search Blog

Search duranek.blogspot.com

Friday, October 28, 2016

Confirm Uniqueness of Columns

To confirm uniqueness of column_A x column_B in a table, add unique constraint:
#alter table x add unique ( column_A,column_B )

To see the constraint do:
#show create table;

#desc table;
if you see MUL near a column, this means it is a part of a unique index. keywords: mysql unique constraint column

To remove it:

#show index from modulestepwriteaccess
#DROP index moduleId on modulestepwriteaccess

Thursday, October 27, 2016

A good mybatis cheatsheet

<script>
SELECT * FROM STUDENT
WHERE DEPARTMENT_ID = #{depId}
<if test='joiningDate != null'> 
<![CDATA[
AND STUDENT_ID <= #{joiningDate} 
]]>
</if>
</script>

Tuesday, October 25, 2016

JSP Eclipse Line Width Format

Window - Preferences - Web - JSP Files - Editor. Click on the link for your kind of JSP (HTML or XML content), and adjust the line width.