๐Ÿ”’ Closed Pagawa ako nga mga menu tulad sa MySQL pleaseeeee kailangan ko ngayooooon

Status
Not open for further replies.
Solution
๐Ÿค–
Vehicles, people, country
Great! Let's start by creating a database to store the information about vehicles, people, and countries. You can use the following SQL statements to create the necessary tables:

Code:
CREATE DATABASE menu_db;
USE menu_db;

CREATE TABLE vehicles (
  id INT PRIMARY KEY AUTO_INCREMENT,
  brand VARCHAR(100),
  model VARCHAR(100),
  year INT,
  price DECIMAL(10,2)
);

CREATE TABLE people (
  id INT PRIMARY KEY AUTO_INCREMENT,
  name VARCHAR(100),
  age INT,
  gender VARCHAR(10)
);

CREATE TABLE countries (
  id INT PRIMARY KEY AUTO_INCREMENT,
  name VARCHAR(100),
  capital VARCHAR(100),
  population INT
);

These statements will create three tables: vehicles, people, and countries, each...
Vehicles, people, country
Great! Let's start by creating a database to store the information about vehicles, people, and countries. You can use the following SQL statements to create the necessary tables:

Code:
CREATE DATABASE menu_db;
USE menu_db;

CREATE TABLE vehicles (
  id INT PRIMARY KEY AUTO_INCREMENT,
  brand VARCHAR(100),
  model VARCHAR(100),
  year INT,
  price DECIMAL(10,2)
);

CREATE TABLE people (
  id INT PRIMARY KEY AUTO_INCREMENT,
  name VARCHAR(100),
  age INT,
  gender VARCHAR(10)
);

CREATE TABLE countries (
  id INT PRIMARY KEY AUTO_INCREMENT,
  name VARCHAR(100),
  capital VARCHAR(100),
  population INT
);

These statements will create three tables: vehicles, people, and countries, each with their respective columns.

Now, let's populate the tables with some sample data:

Code:
INSERT INTO vehicles (brand, model, year, price) VALUES
  ('Toyota', 'Camry', 2018, 25000),
  ('Honda', 'Civic', 2019, 22000),
  ('Ford', 'Mustang', 2020, 40000);

INSERT INTO people (name, age, gender) VALUES
  ('John Doe', 30, 'Male'),
  ('Jane Smith', 25, 'Female'),
  ('Robert Johnson', 40, 'Male');

INSERT INTO countries (name, capital, population) VALUES
  ('USA', 'Washington D.C.', 328200000),
  ('Canada', 'Ottawa', 37360000),
  ('Australia', 'Canberra', 25690000);

Feel free to modify the sample data or add more records as needed.

Now that you have the tables and data set up, you can start querying and manipulating the information in the database using SQL statements. Let me know if you need help with any specific queries or operations!
 
Solution
Status
Not open for further replies.

About this Thread

  • 5
    Replies
  • 467
    Views
  • 1
    Participants
Last reply from:
Unknown user

Online now

Members online
829
Guests online
3,293
Total visitors
4,122

Forum statistics

Threads
2,348,715
Posts
29,358,571
Members
1,092,685
Latest member
mark071
Back
Top