×
FREE ASSISTANCE FOR THE INQUISITIVE PEOPLE
Tutorial Topics
X
softetechnologies
SQL - Structured Query Language Super key - RDBMS
CREATE TABLE - Structured Query Language - SQL
1965    Arnab De    04/04/2018

CREATE TABLE STATEMENT - SQL

We can create tables to store data using CREATE TABLE Statement in any RDBMS. This Statement is differ in different RDBMS.

Basic Systax:

CREATE TABLE <table-name>(List of fields with comma (,) sepators);

Create table statement in MySQL.

mysql>CREATE TABLE emp(eid int(11),ename varchar(40),doj date,salary double(10,2),deptno int(11));

sql create table

Create table from an existing table with all data

mysql> create table emp1 as select * from emp;

sql create table

Create table from an existing table with no data

mysql> create table emp2 as select * from emp where eid=-1;
Query OK, 0 rows affected
Records: 0  Duplicates: 0  Warnings: 0

sql create table
SQL - Structured Query Language Super key - RDBMS
softetechnologies
Author Details
Arnab De
I have over 16 years of experience working as an IT professional, ranging from teaching at my own institute to being a computer faculty at different leading institute across Kolkata. I also work as a web developer and designer, having worked for renowned companies and brand. Through tutorialathome, I wish to share my years of knowledge with the readers.
Enter New Comment
Comment History
No Comment Found Yet.
Sri Sri Ramakrishna Paramahamsa
The world is needed a mixture of truth and make-believe. Discard the make-believe and take the truth.
Sri Sri Ramakrishna Paramahamsa
2018
75.01
Today So Far
Total View (Lakh)
softetechnologies
26/05/2018     52287
25/06/2018     44059
01/01/2018     42982
28/06/2017     40716
02/08/2017     39571
01/08/2017     33742
06/07/2017     33558
15/05/2017     32834
14/07/2017     29127
11/09/2018     29112
softetechnologies