SELECT groups.name
FROM groups
WHERE groups.id in (
SELECT rel.group_id
FROM users_groups rel
WHERE rel.user_id = 'your_user_id'
);
More Related Contents:
- mysql insert values not updating after some hours?
- Hours and seconds are lost when storing a date in the database [closed]
- How to import the Mysql database using Java
- select and delete a record without the information of primary key [closed]
- Using threads to make database requests
- Using env variable in Spring Boot’s application.properties
- Java: Insert multiple rows into MySQL with PreparedStatement
- Handling MySQL datetimes and timestamps in Java
- Connection to Db dies after >4
- No suitable driver found for ‘jdbc:mysql://localhost:3306/mysql [duplicate]
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure [duplicate]
- How can I protect MySQL username and password from decompiling?
- Connect to remote MySQL database through SSH using Java
- Streaming large result sets with MySQL
- How to connect Android with MySQL using Mysql JDBC driver [duplicate]
- Exception in thread “main” java.sql.SQLException: Access denied for user ”@’localhost’ (using password: NO)
- Spring boot JPA insert in TABLE with uppercase name with Hibernate
- Can Hibernate work with MySQL’s “ON DUPLICATE KEY UPDATE” syntax?
- Spring, Hibernate, Blob lazy loading
- runtime error: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
- ‘0000-00-00 00:00:00’ can not be represented as java.sql.Timestamp error
- Java + Mysql UTF8 Problem
- When are connections returned to the connection pool with Spring JPA (Hibernate) Entity Manager?
- com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed
- MySQL connector error “The server time zone value Central European Time” [duplicate]
- SimpleDateFormatter.parse giving output in different format than specified
- Populate JFreechart TimeSeriesCollection from Mysql DB?
- Which is best data type for phone number in MySQL and what should Java type mapping for it be?
- A datetime equivalent in java.sql ? (is there a java.sql.datetime ?)
- A persistent connection with JDBC to MySQL