The Question : 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.
Solution for the question :
CREATE DATABASE MYEARTH; CREATE TABLE CITY ( CITYCODE CHAR(5)PRIMARY KEY, CITYNAME CHAR(30), SIZE INT, AVGTEMP INT, POPULATIONRATE INT, POPULATION INT, );
The correct answer to the question is researched by our moderators and shared with you. You can give feedback by commenting for the answers you think are wrong.