LU07.A02 - SQL-DDL: Table Management

  • Work type: Individual
  • Timeframe: 20 Minutes
  • Means of aid:
    • Only teaching materials, no websearch, no use of ai.
    • Webstorm including MySQL
  • Expected result: Semsntically and syntactically correct SQL statements according to the requirements of the case studies.

Here are six tasks related to MySQL table management, covering CREATE TABLE, ALTER TABLE, and DROP TABLE commands.Have fun 8-)

Create a table called employees with the following columns:

  • employee_id (INT) as the primary key
  • first_name (VARCHAR 50)
  • last_name (VARCHAR 50)
  • hire_date (DATE)
  • salary (DECIMAL)

Create a table called products to store inventory information. The table should have:

  • product_id (INT) as an auto-incrementing primary key.
  • product_name (VARCHAR 100).
  • category (VARCHAR 50).
  • price (DECIMAL).
  • stock_quantity (INT).

Add a new column email (VARCHAR 100) to the employees table.

Change the salary column's data type to FLOAT in the employees table.

Remove the stock_quantity column from the products table.

Completely remove the PRODUCTS table from the database.

English German

Volkan Demir

  • modul/m290/learningunits/lu05/aufgaben/02.txt
  • Zuletzt geändert: 2024/10/24 08:30
  • von vdemir