Search
 
SCRIPT & CODE EXAMPLE
 

SQL

save single sql query result boolean spring boot

@Repository
public interface CompanyRepository extends JpaRepository<Company, Integer> {
    @Query("SELECT CASE WHEN COUNT(c) > 0 THEN true ELSE false END FROM Company c WHERE c.name = :companyName")
    boolean existsByName(@Param("companyName") String companyName);
}
Comment

PREVIOUS NEXT
Code Example
Sql :: add plugins to mysql workbench 
Sql :: oracle params value 
Sql :: get db connection detail from sql developer profile 
Sql :: acceso denegado en msql 
Sql :: update multiple columns in postgres 
Sql :: postgres another version 
Sql :: how to set sql_mode for a query in CI model 
Sql :: Components/Fields of Internal Table 
Sql :: xampp increame mysql speed 
Sql :: oracle executing sqlplus commands and waiting for completion 
Sql :: laravel error SQLSTATE[HY000] [2002] Nenhuma ligação pôde ser feita porque o computador de destino as recusou ativamente 
Sql :: order records between two cordinates sql 
Sql :: mamp mysql config file 
Sql :: get all databases and their tables without primary key mysql 
Sql :: sql add multiple values 
Sql :: modify xml in sql server 
Sql :: group_concat only returns one row 
Sql :: python sql last insertend 
Sql :: shell script to log mysql cpu usage 
Sql :: PL-SQL: mm-dd for subqueries and different columns 
Sql :: how much space does sql server take per row 
Sql :: mysql phpmyadmin mysqli_construct:: error for mac user 
Sql :: what is database username and password in mysqliconnect 
Sql :: Create a username nd password in MySql 
Sql :: mysql clone table with data and add attribute 
Sql :: how to escape single quotes in SQL 
Sql :: how to fetch unique records from two tables 
Sql :: difference between cross apply and inner join 
Sql :: upload multipe databases mysql 
Sql :: oracle chain step succeeded 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =