CREATE QUERY

To create a table in database RDBMS we need certain informations such as table name, attributes, datatypes, column size.

It is a DATABASE DEFINITION LANGUAGE.
A table name must be starting with a character. “T25” is a valid name while “25T” is not a valid name.

DATA TYPES ARE –
int –> define integer types
char –> character type
varchar –> Variable character( more memory efficient in compare to char )
float –> use to define floating values.

TABLE CREATION –

Syntax :

CREATE TABLE <table_name> ( <attr1> <data_type> , <attr2> <data_type> );

EXAMPLE –>

CREATE TABLE  T25 ( UID int, NAME varchar(10),AGE int );

Above syntax is used to create a database with attribute UID, NAME, AGE;

UID

NAME

AGE

In next post we will discuss how to insert value in table :