DESCRIBE TRANSACTION

시작 시간과 상태(실행 중, 커밋됨, 롤백됨)를 포함하여, 트랜잭션 을 설명합니다.

DESCRIBE는 DESC로 축약할 수 있습니다.

참고 항목:

CURRENT_TRANSACTION , LAST_TRANSACTION , BEGIN , COMMIT , ROLLBACK , SHOW TRANSACTIONS

구문

{ DESC | DESCRIBE } TRANSACTION <transaction_id>
Copy

매개 변수

transaction_id

설명할 트랜잭션의 식별자를 지정합니다.

transaction_id 는 세션 변수가 아니라 리터럴이어야 합니다.

사용법 노트

  • 이 명령의 출력을 후처리하기 위해 파이프 연산자 (->>) 또는 RESULT_SCAN 함수를 사용할 수 있습니다. 두 구문 모두 출력을 쿼리할 수 있는 결과 세트로 간주합니다.

    For example, you can use the pipe operator or RESULT_SCAN function to select specific columns from the SHOW command output or filter the rows.

    When you refer to the output columns, use double-quoted identifiers for the column names. For example, to select the output column type, specify SELECT "type".

    You must use double-quoted identifiers because the output column names for SHOW commands are in lowercase. The double quotes ensure that the column names in the SELECT list or WHERE clause match the column names in the SHOW command output that was scanned.

출력

명령의 출력에는 오브젝트의 속성과 메타데이터를 설명하는 다음 열이 포함됩니다.

설명

id

트랜잭션의 고유 식별자입니다.

user

트랜잭션을 실행한 사용자의 사용자 ID입니다.

session name

트랜잭션이 실행된 사용자 세션의 ID입니다.

started_on

트랜잭션이 생성된 날짜 및 시간입니다.

state

트랜잭션의 완료 상태(예: 커밋됨, 롤백됨 또는 아직 실행 중)입니다.

ended_on

트랜잭션이 완료된 날짜 및 시간입니다.

DESC TRANSACTION 1651535571261000000;
Copy