0% found this document useful (0 votes)
38 views

Create Command

The create command in RDBMS is used to create both databases and tables. To create a database, the syntax is "create database database-name;" and to create a table it is "create table table-name (column-name1 datatype1, column-name2 datatype2, etc);". Examples show how to use create to make a database called "Test" and a table called "Student" with columns for ID, name, and age.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Create Command

The create command in RDBMS is used to create both databases and tables. To create a database, the syntax is "create database database-name;" and to create a table it is "create table table-name (column-name1 datatype1, column-name2 datatype2, etc);". Examples show how to use create to make a database called "Test" and a table called "Student" with columns for ID, name, and age.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

create command

create is a DDL command used to create a table or a database.

Creating a Database
To create a database in RDBMS, create command is uses. Following is the Syntax,
create database database-name;

Example for Creating Database


create database Test;
The above command will create a database named Test.

Creating a Table
create command is also used to create a table. We can specify names and datatypes of various
columns along.Following is the Syntax,
create table table-name
(
column-name1 datatype1,
column-name2 datatype2,
column-name3 datatype3,
column-name4 datatype4
);
create table command will tell the database system to create a new table with given table name and
column information.

Example for creating Table


create table Student(id int, name varchar, age int);
The above command will create a new table Student in database system with 3 columns, namely id,
name and age.

You might also like