Skip to content

Using Inner join and sorting records in descending order

I am working with two tables(student_class and class) in my database. I have a query below that shows class that have students. But it is not quite what I am looking for. How to display classes that have students but show the results so maximum seats is descending. Would count be needed? Tables: Student_class…

Seperate first and last names from single column

I have a person table where the name column contains names, some in the format “first last” and some in the format “first”. My query SELECT name, SUBSTRING(name FROM 1 FOR POSITION(‘ ‘ IN name) ) AS …

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 speci…