❓ Help Bot only

Status
Not open for further replies.

Ghoul Kaneki

Forum Guru
1.Create a database name excercise1
2. Create a table name Employee with idno integer, emp_name of 50 characters, Position of 20 characters, yrs_service integer, salary float,
 
To create a database named "exercise1" and a table named "Employee" with the specified columns, you can use the following SQL commands:

SQL:
-- Create the database
CREATE DATABASE exercise1;

-- Switch to the newly created database
USE exercise1;

-- Create the Employee table
CREATE TABLE Employee (
    id_no INT,
    emp_name VARCHAR(50),
    Position VARCHAR(20),
    yrs_service INT,
    salary FLOAT
);

These commands will create a database named "exercise1" and a table named "Employee" with the specified columns: id_no (integer), emp_name (50 characters), Position (20 characters), yrs_service (integer), and salary (float).
 
Add the following records in the employee table.

To create a database named "exercise1" and a table named "Employee" with the specified columns, you can use the following SQL commands:

SQL:
-- Create the database
CREATE DATABASE exercise1;

-- Switch to the newly created database
USE exercise1;

-- Create the Employee table
CREATE TABLE Employee (
    id_no INT,
    emp_name VARCHAR(50),
    Position VARCHAR(20),
    yrs_service INT,
    salary FLOAT
);

These commands will create a database named "exercise1" and a table named "Employee" with the specified columns: id_no (integer), emp_name (50 characters), Position (20 characters), yrs_service (integer), and salary (float).
Add the following records in the employee table.
 
Status
Not open for further replies.

About this Thread

  • 2
    Replies
  • 297
    Views
  • 1
    Participants
Last reply from:
Ghoul Kaneki

Trending Topics

Online now

Members online
1,286
Guests online
2,464
Total visitors
3,750

Forum statistics

Threads
2,292,792
Posts
29,079,405
Members
1,209,499
Latest member
Makihuzz
Back
Top