Last active
March 7, 2022 04:26
-
-
Save tinwritescode/6b289918965957abff31cbf5950f9b8a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| create procedure sp_cautrucbangemp_19127582 is | |
| -- data types | |
| cursor c_emp is | |
| select column_name, data_type from ALL_TAB_COLS where table_name = 'EMP_19127582'; | |
| type ROW_TYPE is record(column_name ALL_TAB_COLS.column_name%type, data_type ALL_TAB_COLS.data_type%type); | |
| -- declare variables | |
| result ROW_TYPE; | |
| begin | |
| dbms_output.put_line('Table: EMP_19127582'); | |
| open c_emp; | |
| loop | |
| fetch c_emp into result; | |
| dbms_output.put_line(result.column_name || ' ' || result.data_type); | |
| exit when c_emp%notfound; | |
| end loop; | |
| close c_emp; | |
| end; | |
| / | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment