How To Create a New Table?
Page 1 of 1
How To Create a New Table?
If you want to create a new table in your own schema, you can log into the server with your
account, and use the CREATE TABLE statement. The following script shows you how to create a
table:
>.\bin\sqlplus /nolog
SQL> connect HR/fyicenter
Connected.
SQL> CREATE TABLE tip (id NUMBER(5) PRIMARY KEY,
2 subject VARCHAR(80) NOT NULL,
3 description VARCHAR(256) NOT NULL,
4 create_date DATE DEFAULT (sysdate));
Table created.
This scripts creates a testing table called "tip" with 4 columns in the schema associated with the
log in account "HR"
account, and use the CREATE TABLE statement. The following script shows you how to create a
table:
>.\bin\sqlplus /nolog
SQL> connect HR/fyicenter
Connected.
SQL> CREATE TABLE tip (id NUMBER(5) PRIMARY KEY,
2 subject VARCHAR(80) NOT NULL,
3 description VARCHAR(256) NOT NULL,
4 create_date DATE DEFAULT (sysdate));
Table created.
This scripts creates a testing table called "tip" with 4 columns in the schema associated with the
log in account "HR"
Similar topics
» How To Create a New Table by Selecting Rows from Another Table?
» How To Create a New Table by Selecting Rows from Another Table?
» How To Create a New Table in Your Schema?
» How To Create a Table Index?
» How To Create a Testing Table?
» How To Create a New Table by Selecting Rows from Another Table?
» How To Create a New Table in Your Schema?
» How To Create a Table Index?
» How To Create a Testing Table?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Sun Jan 31, 2010 12:35 am by Micheal
» Accessing tables of other users in SQL
Sun Jan 31, 2010 12:34 am by Micheal
» Grouping commands in SQL
Sun Jan 31, 2010 12:32 am by Micheal
» Operations on Result Sets in SQL
Sun Jan 31, 2010 12:31 am by Micheal
» Subqueries in SQL
Sun Jan 31, 2010 12:30 am by Micheal
» Joining Relations in SQL
Sun Jan 31, 2010 12:28 am by Micheal
» Delete comand in SQL
Sun Jan 31, 2010 12:27 am by Micheal
» Update command in SQL
Sun Jan 31, 2010 12:26 am by Micheal
» Insert command in SQL
Sun Jan 31, 2010 12:23 am by Micheal