Added basic information (#25293)

* Added additional basic information

* Removed extra line break
This commit is contained in:
Ashwani Kumar
2018-12-19 15:56:43 +05:30
committed by Manish Giri
parent e3744dff30
commit d91bad7d2f

View File

@ -9,11 +9,19 @@ A table is a group of data stored in a database.
To create a table in a database you use the `CREATE TABLE` statement. You give a name to the table and a list of columns with its datatypes.
##### SYNTAX #####
```sql
CREATE TABLE table_name(Attribute1 Datatype,
Attribute2 Datatype,
........);
```
CREATE TABLE TABLENAME(Attribute1 Datatype, Attribute2 Datatype,........);
```
here:
* Attribute1, Attribute2... -> Column Name
* Datatype... -> type of value you want to column have. For eg. int(size), char(size), Varchar(size),etc.
Heres an example creating a table named Person:
```sql
CREATE TABLE Person(
Id int not null,
@ -31,5 +39,5 @@ A column can be `not null` or `null` indicating whether it is mandatory or not.
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->
[SQL | CREATE](https://www.geeksforgeeks.org/sql-create/)