The way you create a table is to use the CREATE TABLE command.
CREATE TABLE users()
So in this situation, the name comes right after the TABLE keyword.
The next thing we do is put all of the columns on a line that we want to put in our table.
CREATE TABLE users(
user_id,
username,
first_name,
last_name
)
Notice the naming conventions here. For this series we are going to make columns with what is known as snake casing. This is where each individual word is separated by an underscore.
if you have more than one column, all of them have to have commas except the last one. The comma is a way to say that another column is coming, so you don't need to do it on the last one. Now you would think we were done, but we also have to say what data type each column is. Later we will extensively discuss data types so we can focus on them exclusively. For now, here are the data types we are going to use:
CREATE TABLE users(
user_id NUMBER,
username VARCHAR2(50),
first_name VARCHAR2(50),
last_name VARCHAR2(50)
)
Now, inside of the parenthesis for varchar2, we pass in a number... This is the max length of the string. But the question is, what is it measured in? The default is actually in bytes, not characters. For example if we have the string hello, it is 5 characters, but it might take up a total of 10 bytes of storage. So I would recommend adding the keyword char right after the number so it defaults to 50 characters, not bytes.
CREATE TABLE users(
user_id NUMBER,
username VARCHAR(50 CHAR),
first_name VARCHAR2(50 CHAR),
last_name VARCHAR2(50 CHAR)
)
This will work to create a table, but it's really missing a lot of information… which column is the primary key? Are we adding any indexes? Is there any thing else we need to say about these columns?
So as you can tell, we are making progress, but there is still so much to learn. The biggest gotcha to remember from this video is that the data type VARCHAR ends in a 2, stupid, right? who would end the name of something with a 2?
Once again, this is Caleb from CalebTheVideoMaker2, and we will catch you in the next one!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HELP ME! http://www.patreon.com/calebcurry
Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter
Donate!: http://bit.ly/DonateCTVM2.
~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~
More content: http://CalebCurry.com
Facebook: http://www.facebook.com/CalebTheVideoMaker
Google+: https://plus.google.com/+CalebTheVideoMaker2
Twitter: http://twitter.com/calebCurry
Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)

Oracle Database11g tutorials 14
How to Create table using command prompt and Create table using sql developer
Blog Link http://bit.ly/1TkY4Oe
Time Line
0:25 Introduction of Tables in Database
1:03 What is Create Table (Introduction of create table)
1:30 Syntax of Create Table
2:08 How to create table using Command Prompt
4:55 How to create table using SQL Developer
Links for
Oracle Database tutorials 4: database connectivity using SQL developer and command prompt
http://youtu.be/wSqoXRlXDUU
You can have indepth knowledge about SQL create table here
http://www.rebellionrider.com/sql-create-table.html
Tool used in this tutorial is command prompt.
This tutorial series is part of SQL expert exam certification training. if you are preparing for SQL certification you can use my tutorials. This SQL Tutorial is a part of free training.
Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage
https://copy.com?r=j7eYO7
Contacts
E-Mail
[email protected]
Twitter
https://twitter.com/rebellionrider
Instagram
http://instagram.com/rebellionrider
Facebook.
https://www.facebook.com/imthebhardwaj
Linkedin.
http://in.linkedin.com/in/mannbhardwaj/
Thanks for linking, commenting, sharing and watching more of our videos
This is Manish from RebellionRider.com
Today in this oracle database tutorial we will see How to CREATE A TABLE.
if we have to define a table in layman language then we can say that Tables are just a collection of Rows and Columns but
In RDBMS tables are database objects which help in organizing data into ROWS and COLUMNS.
We can also say that
SQL tables are kind of data structure which are used by database for efficient storage of data.
To create a table in our database we use SQL CREATE TABLE command.
SQL CREATE TABLE is a type of DATA DEFINITION LANGUAGE also known as DDL.
To Create a table in your schema you will require CREATE TABLE system privilege.
In our future videos we will see what are system and object privileges and how to grant them to a user.
Today for this video we will be using Sample schema HR which already has all the necessary privileges.
Ohk Let's see the syntax.
CREATE TABLE table name
(
column name1 Data-Type(size),
column name2 Data-Type(size),
.....
);
CREATE TABLE is an oracle reserved word or say an Oracle key word whereas
There are 3 different ways of creating a table in Oracle database.
Creating a table using Command Line Interface (CLI) in Oracle database
For demonstrating how to create table in oracle database using CLI, I'll be using Command prompt.
Thats how we create table using command prompt.
you can check your table structure by DESCRIBE command
for that just write
DESC and your table name.
Like this
Another way of creating a table is by using Graphic user interface (GUI) in Oracle database
To demonstrate how to create table using GUI we will use SQL developer.
Lets open our SQL developer
I am connected to HR schema
if you do not know how to create a connection to database using SQL developer please watch my oracle database tutorial 4 that explains database connectivity using SQL developer and command prompt. Link for this video is in the description below.
So lets create a table.
Creating a table using SQL developer is very easy we do not have to fire any query here.
Let's start
First of all right click on your connection in which you want to create a table and choose schema browser.
This will open a separate schema browser pane
or you can expend your connection by clicking this + sign and then right click on table and choose New Table.
However I prefer working with schema browser so let's skip to schema browser pane
here from the first drop-down list you can choose connection name
and in the second drop down list you can choose what database objects you want to work with
we want to create a table thus I'll choose table and then click this arrow here and choose option for new table
Ok we have created a table wizard
first of all give a unique name to your table
and add some column as well. For this, click the green plus button. Now we already have a column so give it some name.
Also choose a datatype from the list and specify any size
you can check this not null column if in case you want to make this a mandatory column
you can also specify default value and constraint
If you want to make this column a primary key you can click here
In my future video i'll show you what are these constraints and different ways of applying them on a column in a table.
for this video we will concentrate on create table only
so when you are done with all your columns click ok
Thats your table
You can double click on your table here and can see its structure.
Thats it

http://softwaredeveloperacademy.com/get-introduction-to-oracle-sql/?utm_source=youtube&utm_medium=video&utm_campaign=isqlpreview - A demonstration of how to create and populate the tables needed for the Introduction to Oracle SQL course.

This Video Tutorial Will Describe how to create a new table in oracle 12C version. This command will also work on other versions of database like Oracle 11g Database, Oracle 10g Database, Oracle 9i Database, Oracle 8i Database, Oracle 8 Database and so on.
Full Syntax will be given in this video tutorial about how to create a new table in oracle database.
Along with live example of new table creation . In this video tutorial we will create a new sample table.
All the keywords, format, mandatory clauses etc are described in this video. As example we create new table with different datatypes and length of data that can be stored in that table. Many columns will be created that can store alphanumeric, numeric , date etc.

This video is going to be a tutorial on how to create composite and compound keys. The difference between a composite and compound key is that a composite key can consist of any columns while a compound key has to consist of columns that are all keys themselves. We will be working with a compound key because we are going to be using the an intermediary table that has two foreign keys. The combination of both of the keys have to be unique.
First, if we have any other CREATE TABLE commands, we are going to comment those out. We will space out the CREATE TABLE to have each column on a line, then we will add constraints as needed.
CREATE TABLE project_users(
project_id,
user_id
)
Now, let's add the data types:
CREATE TABLE project_users(
project_id NUMBER,
user_id NUMBER
}
Now, what about some column attributes? I'm going to make both of the columns NOT NULL because we always want the rows to have a user and a project:
CREATE TABLE project_users(
project_id NUMBER NOT NULL,
user_id NUMBER NOT NULL
}
Now, let's add the foreign key constraints. Now, what do we name these? We are going to add a primary key that covers both of these columns, so I'm going to be a sinner and not give these constraints names:
CREATE TABLE project_users(
project_id NUMBER NOT NULL REFERENCES projects (project_id),
user_id NUMBER NOT NULL REFFERENCES users (user_id)
)
Now, the way we have it now is that if we delete a project in the project table, and there are any rows in the project_users table, it will throw an error and prevent deletion. I would prefer for it to also delete any project members. That would make sense because if you delete a project we want it to delete the associate between that project and certain users. The same goes for if we delete a user, we want their association with a certain project to be deleted. To do this, we need to add the ON DELETE command:
CREATE TABLE project_users(
project_id NUMBER NOT NULL REFERENCES projects (project_id) ON DELETE CASCADE,
user_id NUMBER NOT NULL REFERENCES users (user_id) ON DELETE CASCADE,
)
Finally, let's learn how to create a compound or composite key. literally, the only difference is that you put a comma and add the second table inside of the parenthesis.
CREATE TABLE project_users(
project_id NUMBER NOT NULL REFERENCES projects (project_id) ON DELETE CASCADE,
user_id NUMBER NOT NULL REFERENCES users (user_id) ON DELETE CASCADE,
CONSTRAINT project_users_pk PRIMARY KEY (project_id, user_id)
)
Now, the combination of project_id and user_id cannot be null, is always unique, and has an index.
The only thing we should do now is add a few indexes. We aren't done yet...In the next video we are going to figure out what columns would benefit from indexes and we'll add them to it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HELP ME! http://www.patreon.com/calebcurry
Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter
Donate!: http://bit.ly/DonateCTVM2.
~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~
More content: http://CalebCurry.com
Facebook: http://www.facebook.com/CalebTheVideoMaker
Google+: https://plus.google.com/+CalebTheVideoMaker2
Twitter: http://twitter.com/calebCurry
Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)

If you have a table in your oracle database, and you wish to create a copy of that table, then this video tutorial would give you a perfect solution to your problem. This video tutorial concentrates on create table as a statement of oracle SQL, which is used to create a table of the underlining SQL statement.
We have explained the complete flow with proper examples.
Here you will learn
1. Create table with data
2. Create table without data
To watch more such videos visit our youtube homepage
www.youtube.com/c/kishanmashru
visit out blog at
www.oracleplsqlblog.com

A new series using APEX 18.1 is now available.
https://youtu.be/65LExgaQMHI
This video in the APEX 5 tutorial series shows how to use SQL Scripts (part of SQL Workshop) to run scripts that create tables, sequences (to generate unique values for primary keys), triggers and insert data (INSERT INTO statements).
SQL scripts for this series are available to download at:
http://web.nmsu.edu/~jkreie/oracle/DatabaseTopics.html or by request at
http://db.kreie.net

In this video we are going to be creating foreign keys. I highly recommend watching the previous video before you watch this one.
Essentially, we are creating a very simple database for a system where we can create projects and add people to those projects.
We started with the users table:
--Delete the table if needed:
--DROP TABLE users;
CREATE TABLE users(
user_id NUMBER,
username VARCHAR2(50 CHAR) UNIQUE,
CONSTRAINT users_pk PRIMARY KEY (user_id)
);
Now we are going to create a table for projects with a column that is a foreign key to the username. We're going to want to make this match data types:
CREATE TABLE projects(
project_id NUMBER,
project_name VARCHAR2(50 CHAR) UNIQUE,
creator VARCHAR2(50 CHAR)
)
Next, we need to add the column attributes we decided on last video:
CREATE TABLE projects(
project_id NUMBER,
project_name VARCHAR2(50 CHAR) UNIQUE,
creator VARCHAR2(50 CHAR) NOT NULL
)
NOT NULL because we want every project to have a creator, but we are not labeling UNIQUE because that means we could only have a specific username once in the table. We want to allow a user to create multiple projects.
We also need to add a primary key:
CREATE TABLE projects(
project_id NUMBER,
project_name VARCHAR2(50 CHAR) UNIQUE,
creator VARCHAR2(50 CHAR) NOT NULL,
CONSTRAINT projects_pk PRIMARY KEY (username)
)
Now, the question that remains is, how can I tell Oracle that I want the username to reference the username column of the other table? We have to make a foreign key constraint. As you've learned from the previous videos, there are about three ways to create constraints. You can do it inline at the column level, unnamed. You can do it at the column level, named, and you can do it at the Table level, named. Usually the table-level is preferred, but I will quickly remind you how to do all three again.
CREATE TABLE projects(
project_id NUMBER,
project_name VARCHAR2(50 CHAR) UNIQUE,
creator VARCHAR2(50 CHAR) NOT NULL REFERENCES users (username),
CONSTRAINT projects_pk PRIMARY KEY (project_id)
)
This works, but if we want to name it, we should do this:
CREATE TABLE projects(
project_id NUMBER,
project_name VARCHAR2(50 CHAR) UNIQUE,
creator VARCHAR2(50 CHAR) NOT NULL CONSTRAINT projects_users_fk REFERENCES users (username),
CONSTRAINT projects_pk PRIMARY KEY (project_id)
)
This works, but the preferred method is to do it at the table level:
CREATE TABLE projects(
project_id NUMBER,
project_name VARCHAR2(50 CHAR) UNIQUE,
creator VARCHAR2(50 CHAR) NOT NULL,
CONSTRAINT projects_pk PRIMARY KEY (project_id),
CONSTRAINT projects_users_fk FOREIGN KEY (creator) REFERENCES users (username)
)
Great! So you've learned how to create a foreign key, now we can see it inside of Oracle SQL Developer.
One important thing when it comes to foreign keys is what happens when have data in your database and you try to delete the parent row that a row in the child table references? In the next video we are going to configure that using ON DELETE. See you all then and if you enjoy this series, please do me a huge favor by liking the video and subscribing to my YouTube channel.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HELP ME! http://www.patreon.com/calebcurry
Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter
Donate!: http://bit.ly/DonateCTVM2.
~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~
More content: http://CalebCurry.com
Facebook: http://www.facebook.com/CalebTheVideoMaker
Google+: https://plus.google.com/+CalebTheVideoMaker2
Twitter: http://twitter.com/calebCurry
Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)

Blog Link How to create table :
http://www.rebellionrider.com/sql-create-table.html
How to create table using Enterprise manager 11g
SQL tutorial for beginners with examples on How to create table using enterprise manager 11g
This is the third way of creating a table in oracle database.
If you are working or oracle express edition Then I am sorry This will not work on Oracle express Edition.
Tool used in this tutorial is command prompt.
This tutorial series is part of SQL expert exam certification training. if you are preparing for SQL certification you can use my tutorials. This SQL Tutorial is a part of free training.
Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage
https://copy.com?r=j7eYO7
Contacts
E-Mail
[email protected]
Twitter
https://twitter.com/rebellionrider
Instagram
http://instagram.com/rebellionrider
Facebook.
https://www.facebook.com/imthebhardwaj
Linkedin.
http://in.linkedin.com/in/mannbhardwaj/
Thanks for linking, commenting, sharing and watching more of our videos
This is Manish from RebellionRider.com

hi friends...
today I am going to show you some interesting and important queries in oracle..
1.how to create table from another schema table without data?
2.how insert data in table from another schema table ?
3.how insert specific columns data in table from another schema table?
here I want to create table name empdup based on scott schema emp table..
so guys please watch these carefully..
1.how to create table from another schema table without data?
syntax:
create table tablename as select * from schema.tablename where 2=1;
Eg:create table empdup as select * from scott.emp where 2=1;
we can above example practically...so as shown in video,we have created table in hari user based scott schema emp table without data...
2.how insert data in table from another schema table ?
syntax:
insert into table_name select * from schema_name.table_name;
Eg: insert into empduplicate select * from scott.emp;
we can see this practically...so we got total rows(14) from scott schema emp table data into hari user's table empduplicate..
3.how insert specific columns data in table from another schema table?
Syntax:
insert into table_name(col1,col1,...) select col1,col2.. from schema_name.table_name;
Eg:
insert into empduplicate empno,ename,job select empno,ename,job from scott.emp;
we can also see this in practically..
first I delete total data before inserted in empduplicate..
after executing this query we got only specifice columns data into empduplicate table...
that's it guys...
thank u...
Please Subscribe n Share My Channel for Update..
www.youtube.com/user/prasadamudalapalli

Create Table command in SQL | Oracle | HINDI
How to Create a Table in Oracle SQL Plus Oracle 10G
In this section "How to Create a Table in Oracle SQL Plus Oracle 10G" we will learn how to create a table in Oracle SQL Plus. Before you create table in Sql Plus , you need to decide the name of the table and various columns names and data types of the columns.
Lets us take example of Student table , here you can decide name of the table as student and it could have columns as rollno, name, fees . Data type of rollno column could be either number or char , the data type of name column must be varchar2 type and datatype of fees column must be number.
The sql code to create above student table will be like this:
create table student (rollno number(3), Name varchar2(20), fees Number(8,2));
This way you can create any table in SQL.
-~-~~-~~~-~~-~-
Please watch: "what is flow chart | symbols of flowchart explained in hindi"
https://www.youtube.com/watch?v=k2I8gp1NGGU
-~-~~-~~~-~~-~-