CBSE Class 12 Informatics Practices Question 30 of 40

Practice Paper — Question 4

Back to all questions
4
Question

Question 28

Write MySQL statements for the following :

(i) To create a database named FOOD.

(ii) To create a table named Nutrients based on the following specification :

Column NameData TypeConstraints
Food_ItemVarchar(20)Primary Key
CalorieInteger
Answer

(i)

CREATE DATABASE FOOD;

(ii)

CREATE TABLE Nutrients
(Food_Item Varchar(20) Primary Key,
Calorie integer);