SQL Multiple choices


Total available count: 51
Subject - Databases
Subsubject - SQL

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


 

 

 

 



B


Solution:-

CREATE TABLE statement
The CREATE TABLE statement is used to create a new table in a database.

Syntax

CREATE TABLE table_name (column1 datatype, column2 datatype, column3 datatype, ?column4 datatype, ....);

SQL CREATE TABLE Example
The following example creates a table called "Slightbook" that contains five columns: PersonID, LastName, FirstName, Address, and City:

Example

CREATE TABLE Slightbook (PersonID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255));

 




Next 5 multiple choice(s)

1

Which operator is used to search for a specified pattern in a column?

2

The NOT NULL constraint enforces a column to not accept null values.

3

Which operator is used to select values within a range?

4

What is the most common type of join?

5

With SQL, how can you return the number of records in the "Persons" table?

Comments