Computer Science
Consider the following SQL statement. What type of statement is this ?
CREATE TABLE employee (name VARCHAR, id INTEGER)
- DML
- DDL
- DCL
- Integrity constraint
DDL & DML
3 Likes
Answer
DDL
Reason — The SQL statement CREATE TABLE employee (name VARCHAR, id INTEGER)
is a Data Definition Language (DDL) statement. DDL statements are used to define, modify, and delete database objects such as tables, views, indexes, etc. In this case, the statement is creating a new table named employee
with columns, name
of type VARCHAR
and id
of type INTEGER
.
Answered By
1 Like
Related Questions
Identify the error :
DELETE ALL FROM TABLE EMPL ;
Differentiate between DDL and DML.
The data types
CHAR(n)
andVARCHAR(n)
are used to create ……………, and …………… length types of string/text fields in a database.- Fixed, equal
- Equal, variable
- Fixed, variable
- Variable, equal
A table Table1 has two text fields defined as below :
: Name1 varchar(20), Name2 char(20), :
If Name1 stores value as 'Ana' and Name2 stores value as 'Anuj', then Name1 will consume ………….. characters' space and Name2 will consume …………… characters' space.
- 3, 20
- 20, 4
- 20, 20
- 3, 4