Perform the following steps to create and load documents into a table.
Before creating any tables, assume the identity of the user you just created.
CONNECT myuser;
The following example creates a table called docs
with two columns, id
and text
, by using the CREATE
TABLE
statement. This example makes the id
column the primary key. The text
column is VARCHAR2
.
CREATE TABLE docs (id NUMBER PRIMARY KEY, text VARCHAR2(200));
Use the SQL INSERT
statement to load text to a table.
To populate the docs
table, use the INSERT
statement as follows:
INSERT INTO docs VALUES(1, '<HTML>California is a state in the US.</HTML>'); INSERT INTO docs VALUES(2, '<HTML>Paris is a city in France.</HTML>'); INSERT INTO docs VALUES(3, '<HTML>France is in Europe.</HTML>');