강의

멘토링

로드맵

Inflearn Community Q&A

gwise's profile image
gwise

asked

Spring Boot Introduction by Example

(18) MyBatis - Using the result value

resultType 을 String 으로 할 수는 없나요?

Written on

·

281

0

<select id="articleCount" resultType="_int">

select count(*) from simple_bbs

</select>

_ int를  _String으로 하니 에러가 나네요.

spring-boot

Quiz

MyBatis를 사용하여 데이터베이스 작업을 수행할 때, JDBC 템플릿 방식과 비교하여 얻을 수 있는 주요 이점은 무엇일까요?

런타임 오류 없이 컴파일 시점에 모든 SQL 오류 발견

SQL 문과 Java 코드를 분리하여 간결하게 관리

어떤 데이터베이스를 사용하든 SQL 문 수정 없이 동일한 코드 유지

개발자가 직접 SQL 문을 작성할 필요 없이 자동 생성

Answer 1

0

java님의 프로필 이미지
java
Instructor

카운트를 세는 건 결과가 숫자입니다.

그러므로 _int 를 사용하셔야 합니다.

gwise's profile image
gwise

asked

Ask a question