Skip to content
Advertisement

Tag: mysql

JPA @Column annotation to create comment/description

I was wondering is it possible to create from jpa/hibernate annotation a database column description/comment like this: ALTER TABLE tablename CHANGE status status INT(11) NOT NULL COMMENT ‘sample description/comment’; It will be great functionality, but I cant find anything about this in JPA specification. Maybe I should use @Column(columnDefinition=””) property, but I dont have any clue. Please help Answer I

SQL – Get result of current year only

How can I get the result of the current year using SQL? I have a table that has a column date with the format yyyy-mm-dd. Now, I want to do select query that only returns the current year result. The pseudo code should be like: The result should be as following: How can I do this? Answer Use YEAR() to

Advertisement