+ 5

Which SQL statement is used to create a table in a database?

CREATE DATABASE TABLE?

25th Mar 2017, 8:19 AM
Hassan Papi
Hassan Papi - avatar
5 Answers
+ 10
CREATE TABLE TABLE_NAME (ATTRIBUTE_NAME DATA_TYPE);
25th Mar 2017, 8:24 AM
Saumya
Saumya - avatar
+ 2
CREATE TABLE table_name ( column1 datatype, column2 datatype, columnN datatype, PRIMARY KEY(one or more columns) ) ;
25th Mar 2017, 8:26 AM
Bhabesh Gogoi
Bhabesh Gogoi - avatar
+ 1
hola
25th Mar 2017, 6:14 PM
Lmg 712
Lmg 712 - avatar
0
CREATE TABLE tableTe ( columnName dataType, columnName2 dataType(sizeOptional), PRIMARY KEY (columnName)); example CREATE TABLE product ( id int(4), name varchar(100) NOT NULL, color char, PRIMARY KEY (id) ); that not null means that it should be informed, but don't need to be the unique record with the name.
26th Mar 2017, 2:04 AM
Thiago Andrade Leite da Silva
Thiago Andrade Leite da Silva - avatar
0
CREATE TABLE table_name ( column_name1 data_type(size), column_name2 data_type(size), column_name3 data_type(size), .... columnN data_type(size) );
26th Mar 2017, 11:39 AM
Anitha Devi.V
Anitha Devi.V - avatar