+ 5
Which SQL statement is used to create a table in a database?
CREATE DATABASE TABLE?
5 Answers
+ 10
CREATE TABLE TABLE_NAME (ATTRIBUTE_NAME DATA_TYPE);
+ 2
CREATE TABLE table_name (
column1 datatype,
column2 datatype,
columnN datatype,
PRIMARY KEY(one or more columns)
) ;
+ 1
hola
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.
0
CREATE TABLE table_name
(
column_name1 data_type(size),
column_name2 data_type(size),
column_name3 data_type(size),
....
columnN data_type(size)
);