Question

Emirates College of Technology Lab Exercise #1 AConsider the following answer the questions below 2 table named Car and the
Emirates College of Technology Lab Exercise #1 AConsider the following answer the questions below : 2 table named Car and t
Emirates College of Technology Lab Exercise #1 AConsider the following answer the questions below 2 table named "Car" and then use database management system to 116 marks Car umber BrandModel Opel Opel 2348 2546 233 Volkswagen VSE 648 BFK 297 SB A5526 1000 1.8 29000 zafira Golf 1. Write an SQl, statement to create the car table shown above. Set CNumber as primary key (4 marks) 2. 3 marks) Write an SQL statement to insert all the records. Write an SQL statement to display the model, engine, and price of all the cars which their brand is Opel. 3. (2marks) Write an SQL statement to display the minimum price for all the cars which their engine less than 2. 4. (2 marks) Write an SQL statement to change the price of the golf model to be 20000. s. (2.5 marks) 6. Write an SQL statement to delete all the cars which their registration starts with "V (2.5 marks)
Emirates College of Technology Lab Exercise #1 AConsider the following answer the questions below : 2 table named "Car" and then use database management system to 116 marks Car CNumber Model 2348 2546 233 Volkswagen 1.8VSE 648 19000 29000 Opel Opel BFK 297 zafira Golf SB A5526 15000 1. Write an SQI, statement to create the car table shown above. Set CNumber as primary key (4 marks) 2. Write an SQL statement to insert all the records. 3 marks) Write an SQL statement to display the model, engine, and price of all the cars which their brand is Opel. 3. (2marks) Write an SQL statement to display the minimum price for all the ears which their engine less than 2. 4. (2 marks) Write an SQL statement to change the price of the golf model to be 20000. s. 2.5 marks) Write an SQL statement to delete all the cars which their registration starts with "y". (2.5 marks) 6.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

All the SQL queries for all the questions have been provided below:

Q.1. CREATE TABLE Car
(
CNumber INTEGER,
Brand VARCHAR(30),
Model VARCHAR(30),
Engine FLOAT(4),
Registration VARCHAR(30),
Price INTEGER,
PRIMARY KEY(CNumber)
);

Q. 2. INSERT INTO Car (CNumber, Brand, Model, Engine, Registration, Price)

VALUES (2348, 'Opel', 'vectra', 1.8, 'VSE 648', 19000);

INSERT INTO Car (CNumber, Brand, Model, Engine, Registration, Price)

VALUES (2546, 'Opel', 'zafira', 2.0, 'BFK 297', 29000);

INSERT INTO Car (CNumber, Brand, Model, Engine, Registration, Price)

VALUES (5233, 'Volkswagen', 'Golf', 1.4, 'SB A5526', 15000);

Q. 3. SELECT Model, Engine, Price

FROM Car

WHERE Brand = 'Opel';

Q. 4. SELECT MIN(Price)

FROM Car

WHERE Engine < 2;

Q. 5. UPDATE Car

SET Price = 20000

WHERE Model = 'Golf';

Q. 6. DELETE FROM Car

WHERE Registration LIKE 'V%';

*Please provide feedback if it clarifies your concept.

Add a comment
Know the answer?
Add Answer to:
Emirates College of Technology Lab Exercise #1 AConsider the following answer the questions below 2 table named "Car" and then use database management system to 116 marks Car umber Bra...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT