In the program I am trying to write, I need to extract table names, attribute names, data types from a text file which is actually a SQL DDL.The text file is something like this
Is there an easy way to extract table names and attribute names from such a text file?
Thanks.
Code:
CREATE TABLE SYSTEM.AQ$_INTERNET_AGENT ( AGENT_NAME VARCHAR2(30) NOT NULL, PROTOCOL NUMBER(0) NOT NULL, SPARE1 VARCHAR2(128), PRIMARY KEY (AGENT_NAME) ); CREATE TABLE SYSTEM.AQ$_INTERNET_AGENT_PRIVS ( AGENT_NAME VARCHAR2(30) NOT NULL, DB_USERNAME VARCHAR2(30) NOT NULL );
Thanks.
Comment