Mohammed Alaslani Blog

April 10, 2010

How to create and insert values into table(SQL)

Filed under: Uncategorized — maslani4 @ 3:26 pm

In this blog i will show how user an create table and insert data into the table he want.

First of all we must use this syntax :

CREATE TABLE (TABLE_NAME)

(

Then after the (

You an declare any attribute you want

So for example lets create the student table:

CREATE TABLE STUDENT

(

STUDENT_NAME VARHAR2(25),

STUDENT_NUMBER NUMBER(10);

)

This the result we will have:

STUDENT_NAME STUDENT_NUMBER

Now let say we want to add value for that table

so we must use this syntax

INSERT INTO STUDENT VALUES (‘Mohammed Alaslani’ , 12982831);

This the final result will be for the student table

STUDENT_NAME STUDENT_NUMBER
Mohammed Alaslani 12982831

* The values are example from me you an use whatever you want but the same type you have delared.

Written by: Mohammed Alaslani

Advertisement

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.