PostgreSQL에서 UUID Type 데이터 쿼리 및 업데이트

ID에 대한 고유한 값으로써 사용할만한 Type으로 PostgreSQL에서는 UUID 타입을 제공하는데요. 이 데이터 타입으로 조회하거나 Update하는 예는 아래와 같습니다.

select * from ecl_logic_node_p where networkid::text = '176f54c1-f333-426f-b4d5-29c365ec3ac3'
select * from ecl_logic_node_p where networkid = '176f54c1-f333-426f-b4d5-29c365ec3ac3'
select * from ecl_logic_node_p where networkid = '176f54c1-f333-426f-b4d5-29c365ec3ac3'::uuid

select networkid::text from ecl_logic_node_p

update ecl_logic_node_p set networkid = '176f54c1-f333-426f-b4d5-29c365ec3acf' where fid = 0

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다