# JPQL 타입 표현과 기타식

JPQL 타입 표현

* 문자: ‘HELLO’, ‘She’’s’
* Boolean: TRUE, FALSE
* 숫자: 10L(Long), 10D(Double), 10F(Float)
* ENUM: jpabook.MemberType.Admin (패키지명 포함)
* 엔티티 타입: TYPE(m) = Member (**상속 관계에서 사용**)\
  \=>**타입캐스팅처럼 사용**할 수 있다.\
  엔티티 타입이 Member인 것들만 사용할 때\
  ex) Item을 상속하는 Album, Book, Movie

```sql
em.createQuery("select i from Item i where type(i) = Book",Item.class).getResultList();
```

\==  ==  ==  ==  ==  ==  ==  ==  SQL 기초 지식.SQL 공부 필요   ==  ==  ==  ==  ==  ==  ==  == &#x20;

JPQL 기타 - SQL과 문법이 같은 식

* EXISTS, IN
* AND, OR, NOT
* \=, >, >=, <, <=, <>
* BETWEEN, LIKE, **IS NULL**

SQL IN절 사용 예시\
IN : 리스트로 파라미터 넘겨서 Id가 같은 멤버를 10개씩 가져와야할 때. 10개를 인자로 넘겨서 IN 절 작성.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://heunnajo.gitbook.io/jpa-basic/10.-1/jpql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
