SQL Multiple choices


Total available count: 51
Subject - Databases
Subsubject - SQL

What is the use of Data Definition Language(DDL) in SQL?


 

 

 

 



A


Solution:-

Data definition language (DDL) refers to the set of SQL commands that can create and manipulate the structures of a database. DDL statements are used to create, change, and remove objects including indexes, triggers, tables, and views. 
Common DDL statements include: 

CREATE (generates a new table)
The syntax for creating a table is this:
CREATE TABLE table name (field name data type);

An example of creating a table is this:
CREATE TABLE Slightbook (visiterName, varchar);

ALTER (alters table)
The syntax for altering a table is this:
ALTER TABLE table_name ADD column_name datatype;

An example of altering a table is this:
ALTER TABLE Slightbook ADD Email varchar(255);

DROP (removes a table from the database)
The syntax for dropping a table is this:
DROP TABLE table_name;

An example of dropping a table is this:
DROP TABLE Slightbook;




Next 5 multiple choice(s)

1

What is the use of Data manipulation Language(DML) in SQL?

2

Among the below commands, Which is not SCS command?

3

Among the below commands, Which is the SCS command?

4

What is the meaning of SCS in SQL?

5

Among the below commands, Which is not TCS command?

Comments