.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> DataBase >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Basics - Table in Oracle

Posted By:Deepika Haridas       Posted Date: October 13, 2010    Points: 50    Category: DataBase    URL: http://www.dotnetspark.com  

This article describes about Tables and creating them in Oracle
 

Table - Basic unit of storage; composed of rows and columns

Naming Rules - 

1. Table names and column names:
2. Must begin with a letter
3. Must be 1-30 characters long
4. Must contain only A-Z, a-z, 0-9, _, $, and #
5. Must not duplicate the name of another object owned by the same user
6. Must not be an Oracle server reserved word

CREATE TABLE statement -

1. You must have:
-CREATE TABLE privilege
-A storage area
2. You specify:
-Table name
-Column name, column data type, and column size

Refer other user's table - 

.Tables belonging to other users are not in the user's schema.
.You should use the owner's name as a prefix to those tables. 

For example :

CREATE TABLE dept (deptno NUMBER(2),
dname VARCHAR2(14),
loc VARCHAR2(13));

Table created.



DESCRIBE dept

Name Null? type
DEPTNO NUMBER(2)
DNAME VARCHAR2(14)
LOC VARCHAR2(13)

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend