SELECT r.industry_1,r.industry_2,r.agent_id,r.agent_name,COUNT(DISTINCT r.customer_name_a)数据总量,COUNT(DISTINCT CASE WHEN r.ifhs='Y' THEN r.customer_name_a END)海关数据量,COUNT(DISTINCT CASE WHEN r.ifgjh='Y'THEN r.customer_name_a END)广交会数据量,COUNT(DISTINCT C
1.%TYPE DECLARE DNAME DEPT.DNAME%TYPE; --动态的定义变量的类型,跟随着dept表中dname字段的类型变化而变化滴呀 BEGIN SELECT DNAME INTO DNAME FROM DEPT WHERE DEPTNO=50; DBMS_OUTPUT.PUT_LINE(DNAME); END; 2.%ROWTYPE DECLARE V_ROW DEPT%ROWTYPE; --和dept表中的每一列数据类型都相同滴呀 BEGIN SELECT * INT