📅  最后修改于: 2022-03-11 15:05:17.504000             🧑  作者: Mango
WITH get_cust_code_for_cust_id AS (
SELECT cust_code FROM cust WHERE cust_id=11
)
INSERT INTO public.table_1(
cust_code, issue, status, created_on)
VALUES (SELECT cust_code FROM get_cust_code_for_cust_id, 'New Issue', 'Open', current_timestamp)