Introductions

Introductions

Instructor-svgAl-Mamun Sarkar
Apr 14 , 2020

I will use the following employees and payments tables for all examples in the series.

 

employees:

Column Data Type
id Number
name Varchar
email Varchar
gender Varchar
salary Number
city Varchar
country Varchar

 

payments:

Column Data Type
id Number
employee_id Number
date Date
amount Double

 

Date of Employee Table:

id

name

email

gender

salary

city

country

1

Jone

jone@gmail.com

male

5000

Berlin

Germany

2

Oscar

oscar@gmail.com

male

6000

London

UK

3

Lily

lily@hotmail.com

female

3000

Lulea

Sweden

4

Jone Smit

smit@yahoo.com

male

4500

London

UK

5

Lillian

lillian@gmail.com

female

5000

Chicago

USA

6

James

james@live.com

male

8000

Lulea

Sweden

7

Charlie

charlie@hotmail.com

male

2000

Washington

USA

8

Thomas

thomas@gmail.com

male

7500

Columbus

USA

9

Lillian

Lillian@gmail.com

female

4500

Toronto

Canada

 

SQL to Insert Data:

Run the following queries

INSERT INTO `employees` (`id`, `name`, `email`, `gender`, `salary`, `city`, `country`) VALUES (NULL, 'Jone', 'jone@gmail.com', 'male', '5000', 'Berlin', 'Germany');
INSERT INTO `employees` (`id`, `name`, `email`, `gender`, `salary`, `city`, `country`) VALUES (NULL, 'Oscar', 'oscar@gmail.com', 'male', '6000', 'London', 'UK');
INSERT INTO `employees` (`id`, `name`, `email`, `gender`, `salary`, `city`, `country`) VALUES (NULL, 'Lily', 'lily@hotmail.com', 'female', '3000', 'Lulea', 'Sweden');
INSERT INTO `employees` (`id`, `name`, `email`, `gender`, `salary`, `city`, `country`) VALUES (NULL, ' Jone Smit', 'smit@yahoo.com', 'male', '4500', 'London', 'UK');
INSERT INTO `employees` (`id`, `name`, `email`, `gender`, `salary`, `city`, `country`) VALUES (NULL, 'Lillian', 'lillian@gmail.com', 'female', '5000', 'Chicago', 'USA');
INSERT INTO `employees` (`id`, `name`, `email`, `gender`, `salary`, `city`, `country`) VALUES (NULL, 'James', 'james@live.com', 'male', '8000', 'Lulea', 'Sweden');
INSERT INTO `employees` (`id`, `name`, `email`, `gender`, `salary`, `city`, `country`) VALUES (NULL, 'Charlie', 'charlie@hotmail.com', 'male', '2000', 'Washington', 'USA');
INSERT INTO `employees` (`id`, `name`, `email`, `gender`, `salary`, `city`, `country`) VALUES (NULL, 'Thomas', 'thomas@gmail.com', 'male', '7500', 'Columbus', 'USA');
INSERT INTO `employees` (`id`, `name`, `email`, `gender`, `salary`, `city`, `country`) VALUES (NULL, 'Lillian', 'Lillian@gmail.com', 'female', '4500', 'Toronto', 'Canada');

 

  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram