Computer Science, asked by nikitadas2801, 11 months ago

Write SQL query to create the Table Flight with following structures:
Field------------- Type
Flight_ID------- Char (4)
Flight_Name--- Varchar (25)
Source------------ Varchar (30)
Destination------- Varchar (30)

Answers

Answered by udit4904
208
create table flight(
Flight _id char(4)
Flight_Name Varchar (25)
Source Varchar (30)
DestinFlight_Name Varchar (25) );
plz mark me brainliest if u like

udit4904: is it correct nikitadas
dghgdsd: Noooo
Sumimi: Nope
Answered by AskewTronics
23

The SQL Query for the above question is as follows:

Explanation:

Query:

CREATE TABLE Flight  

(

Flight_ID c h a r /* There is no space in data type which is written in "c h a r"*/ (4),

Flight_Name varc h a r /* There is no space in data type which is written in "c h a r"*/(25),

Source varc h a r /* There is no space in data type which is written in "c h a r"*/(30),

Destination varc h a r /* There is no space in data type which is written in "c h a r"*/(30)

);

Output:

The above query will create a database with the Flight name with the above description which is defined in the question.

Code Explanation:

  • When a user wants to create a table in the database then he needs to follow the rule of creating a table statement because the "create table" statement is used to create a table for any database.
  • The create table statement syntax is stated below:CREATE TABLE TABLE_NAME ( COLUMN_1_NAME DATATYPE(SIZE), COLUMN_2_NAME DATATYPE(SIZE),...., COLUMN_n_NAME DATATYPE(SIZE) );

Learn More:

  • Create table : https://brainly.in/question/9110800
  • Create table : https://brainly.in/question/8476254

Similar questions