Before we start the task for today we will test that we have our set-up correct.
Write a simple create table statement:
CREATE TABLE Test( UserName varchar(10) );
< Enter">> will run the statement, or use the <
> button on the left side of the editor pane.Right click on the gutter between the editor and execute buttons and check the <
> box --- this can be helpful to find errors.Check the Navigator window to see if it created OK.
You will probably need to drill into your schema to find the tables:
<
Databases > Schemas > your username > Tables">>.You probably won't see the Test
table since the Navigator pane does not automatically refresh --- you need to manually do this. Right click on the <
You should see the Test
table now.
Try inserting some data:
INSERT INTO Test (UserName) VALUES ('doris');
Use < Enter">> to run the insert statament.
Now we can test that it worked by interrogating the database with a SELECT
statement:
SELECT * FROM Test;
to check it is there.
Test completed. Clear out the the Test
table and we are ready to start work.
DROP TABLE Test;