❓ 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
  • 292
    Views
  • 1
    Participants
Last reply from:
Ghoul Kaneki

Trending Topics

Online now

Members online
385
Guests online
1,125
Total visitors
1,510

Forum statistics

Threads
2,275,094
Posts
28,960,617
Members
1,233,593
Latest member
clumvie
Back
Top