Charu has to create a database named MYEARTH in MYSQL. She now needs to create a table named CITY in the database to store the records of various cities across the globe. The table CITY has the following structure: 

Table: CITY

FIELD NAME
DATA TYPE REMARKS
CITYCODE  CHAR (5)  Primary Key 
CITYNAME  CHAR (30)   
SIZE INTEGER  
AVGTEMP INTEGER  
POLLUTIONRATE INTEGER  
POPULATION  INTEGER  

 

Help her to complete the task by suggesting appropriate SQL commands.

Answer

Slide47.JPG

Slide48.JPG
Slide49.JPG

Remove Ads
Teachoo · Class 12 Explore Class 12
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.

Many students prefer Teachoo Black for a smooth, ad-free learning experience.