SQL/MySQL/Date Time/Date Type
Содержание
- 1 Convert Date to int
- 2 Date and Time Sizes, Formats, and Ranges
- 3 Define and check the date data type
- 4 Define and use Date data type
- 5 Defining Set Membership:Finding Records in a Set
- 6 Performing Range Tests 1
- 7 Performing Range Tests 2
- 8 Performing Range Tests 3
- 9 Show current date
- 10 Use date data type
Convert Date to int
/*
mysql> Drop table Transactions;
Query OK, 0 rows affected (0.09 sec)
mysql> CREATE TABLE Transactions (
-> ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> OrderID INT NOT NULL,
-> DVDID SMALLINT NOT NULL,
-> DateOut DATE NOT NULL,
-> DateDue DATE NOT NULL,
-> DateIn DATE NOT NULL
-> )
-> ENGINE=INNODB;
Query OK, 0 rows affected (0.12 sec)
mysql> INSERT INTO Transactions (OrderID, DVDID, DateOut, DateDue)
-> VALUES (1, 1, CURDATE(), CURDATE()+3),
-> (1, 4, CURDATE(), CURDATE()+1),
-> (1, 8, CURDATE(), CURDATE()+2),
-> (2, 3, CURDATE(), CURDATE()+3),
-> (3, 4, CURDATE(), CURDATE()+4),
-> (3, 1, CURDATE(), CURDATE()+5),
-> (3, 7, CURDATE(), CURDATE()+6),
-> (4, 4, CURDATE(), CURDATE()+7),
-> (5, 3, CURDATE(), CURDATE()+8),
-> (6, 2, CURDATE(), CURDATE()+7),
-> (6, 1, CURDATE(), CURDATE()+6),
-> (7, 4, CURDATE(), CURDATE()+6),
-> (8, 2, CURDATE(), CURDATE()+5),
-> (8, 1, CURDATE(), CURDATE()+4),
-> (8, 3, CURDATE(), CURDATE()+4),
-> (9, 7, CURDATE(), CURDATE()+3),
-> (9, 1, CURDATE(), CURDATE()+3),
-> (10, 5, CURDATE(), CURDATE()+1),
-> (11, 6, CURDATE(), CURDATE()+2),
-> (11, 2, CURDATE(), CURDATE()+6),
-> (11, 8, CURDATE(), CURDATE()+5),
-> (12, 5, CURDATE(), CURDATE()+4),
-> (13, 7, CURDATE(), CURDATE()+3);
Query OK, 23 rows affected (0.06 sec)
Records: 23 Duplicates: 0 Warnings: 0
mysql> select * from Transactions;
+----+---------+-------+------------+------------+------------+
| ID | OrderID | DVDID | DateOut | DateDue | DateIn |
+----+---------+-------+------------+------------+------------+
| 1 | 1 | 1 | 2005-10-08 | 2005-10-11 | 0000-00-00 |
| 2 | 1 | 4 | 2005-10-08 | 2005-10-09 | 0000-00-00 |
| 3 | 1 | 8 | 2005-10-08 | 2005-10-10 | 0000-00-00 |
| 4 | 2 | 3 | 2005-10-08 | 2005-10-11 | 0000-00-00 |
| 5 | 3 | 4 | 2005-10-08 | 2005-10-12 | 0000-00-00 |
| 6 | 3 | 1 | 2005-10-08 | 2005-10-13 | 0000-00-00 |
| 7 | 3 | 7 | 2005-10-08 | 2005-10-14 | 0000-00-00 |
| 8 | 4 | 4 | 2005-10-08 | 2005-10-15 | 0000-00-00 |
| 9 | 5 | 3 | 2005-10-08 | 2005-10-16 | 0000-00-00 |
| 10 | 6 | 2 | 2005-10-08 | 2005-10-15 | 0000-00-00 |
| 11 | 6 | 1 | 2005-10-08 | 2005-10-14 | 0000-00-00 |
| 12 | 7 | 4 | 2005-10-08 | 2005-10-14 | 0000-00-00 |
| 13 | 8 | 2 | 2005-10-08 | 2005-10-13 | 0000-00-00 |
| 14 | 8 | 1 | 2005-10-08 | 2005-10-12 | 0000-00-00 |
| 15 | 8 | 3 | 2005-10-08 | 2005-10-12 | 0000-00-00 |
| 16 | 9 | 7 | 2005-10-08 | 2005-10-11 | 0000-00-00 |
| 17 | 9 | 1 | 2005-10-08 | 2005-10-11 | 0000-00-00 |
| 18 | 10 | 5 | 2005-10-08 | 2005-10-09 | 0000-00-00 |
| 19 | 11 | 6 | 2005-10-08 | 2005-10-10 | 0000-00-00 |
| 20 | 11 | 2 | 2005-10-08 | 2005-10-14 | 0000-00-00 |
| 21 | 11 | 8 | 2005-10-08 | 2005-10-13 | 0000-00-00 |
| 22 | 12 | 5 | 2005-10-08 | 2005-10-12 | 0000-00-00 |
| 23 | 13 | 7 | 2005-10-08 | 2005-10-11 | 0000-00-00 |
+----+---------+-------+------------+------------+------------+
23 rows in set (0.01 sec)
mysql> SELECT OrderID, ID, DVDID,
-> CONVERT(DateOut, UNSIGNED) AS DateOut_INT
-> FROM Transactions
-> WHERE DVDID=4 OR DVDID=5 OR DVDID=7
-> ORDER BY OrderID, ID, DVDID;
+---------+----+-------+-------------+
| OrderID | ID | DVDID | DateOut_INT |
+---------+----+-------+-------------+
| 1 | 2 | 4 | 20051008 |
| 3 | 5 | 4 | 20051008 |
| 3 | 7 | 7 | 20051008 |
| 4 | 8 | 4 | 20051008 |
| 7 | 12 | 4 | 20051008 |
| 9 | 16 | 7 | 20051008 |
| 10 | 18 | 5 | 20051008 |
| 12 | 22 | 5 | 20051008 |
| 13 | 23 | 7 | 20051008 |
+---------+----+-------+-------------+
9 rows in set (0.00 sec)
*/
Drop table Transactions;
CREATE TABLE Transactions (
ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
OrderID INT NOT NULL,
DVDID SMALLINT NOT NULL,
DateOut DATE NOT NULL,
DateDue DATE NOT NULL,
DateIn DATE NOT NULL
)
ENGINE=INNODB;
INSERT INTO Transactions (OrderID, DVDID, DateOut, DateDue)
VALUES (1, 1, CURDATE(), CURDATE()+3),
(1, 4, CURDATE(), CURDATE()+1),
(1, 8, CURDATE(), CURDATE()+2),
(2, 3, CURDATE(), CURDATE()+3),
(3, 4, CURDATE(), CURDATE()+4),
(3, 1, CURDATE(), CURDATE()+5),
(3, 7, CURDATE(), CURDATE()+6),
(4, 4, CURDATE(), CURDATE()+7),
(5, 3, CURDATE(), CURDATE()+8),
(6, 2, CURDATE(), CURDATE()+7),
(6, 1, CURDATE(), CURDATE()+6),
(7, 4, CURDATE(), CURDATE()+6),
(8, 2, CURDATE(), CURDATE()+5),
(8, 1, CURDATE(), CURDATE()+4),
(8, 3, CURDATE(), CURDATE()+4),
(9, 7, CURDATE(), CURDATE()+3),
(9, 1, CURDATE(), CURDATE()+3),
(10, 5, CURDATE(), CURDATE()+1),
(11, 6, CURDATE(), CURDATE()+2),
(11, 2, CURDATE(), CURDATE()+6),
(11, 8, CURDATE(), CURDATE()+5),
(12, 5, CURDATE(), CURDATE()+4),
(13, 7, CURDATE(), CURDATE()+3);
select * from Transactions;
SELECT OrderID, ID, DVDID,
CONVERT(DateOut, UNSIGNED) AS DateOut_INT
FROM Transactions
WHERE DVDID=4 OR DVDID=5 OR DVDID=7
ORDER BY OrderID, ID, DVDID;
Date and Time Sizes, Formats, and Ranges
+---------+-----+--------------------+----------------+-----------------+
|Type |Bytes|Format |Start Date |End Date |
+---------+-----+--------------------+----------------+-----------------+
|DATE |3 |YYYY-MM-DD |1000-01-01 |9999-12-31 |
+---------+-----+--------------------+----------------+-----------------+
|DATETIME |8 |YYYY-MM-DD HH:MM:SS |1000-01-01 |9999-12-31 |
|and | | |00:00:00 |23:59:59 |
|TIMESTAMP| | | | |
+---------+-----+--------------------+----------------+-----------------+
Define and check the date data type
/*
mysql> Drop table Bird;
Query OK, 0 rows affected (0.08 sec)
mysql> CREATE TABLE Bird (
-> name VARCHAR(20),
-> owner VARCHAR(20),
-> species VARCHAR(20),
-> sex CHAR(1),
-> birth DATE,
-> death DATE
-> );
Query OK, 0 rows affected (0.04 sec)
mysql> SHOW TABLES;
+----------------+
| Tables_in_info |
+----------------+
| bird |
| cloth |
| course |
| employee |
| event |
| exam |
| myusers |
| report |
| timetable |
| users |
+----------------+
10 rows in set (0.00 sec)
mysql> /* To verify that the table was created the way you expected,
mysql> use a DESCRIBE statement:
ERROR 1049 (42000): Unknown database "a"
mysql> */
mysql> DESCRIBE Bird;
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| name | varchar(20) | YES | | NULL | |
| owner | varchar(20) | YES | | NULL | |
| species | varchar(20) | YES | | NULL | |
| sex | char(1) | YES | | NULL | |
| birth | date | YES | | NULL | |
| death | date | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+
6 rows in set (0.01 sec)
*/
Drop table Bird;
CREATE TABLE Bird (
name VARCHAR(20),
owner VARCHAR(20),
species VARCHAR(20),
sex CHAR(1),
birth DATE,
death DATE
);
SHOW TABLES;
/* To verify that the table was created the way you expected,
use a DESCRIBE statement:
*/
DESCRIBE Bird;
Define and use Date data type
/*
mysql> Drop table Bird;
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE TABLE Bird (
-> name VARCHAR(20),
-> owner VARCHAR(20),
-> species VARCHAR(20),
-> sex CHAR(1),
-> birth DATE,
-> death DATE
-> );
Query OK, 0 rows affected (0.05 sec)
mysql> INSERT INTO Bird VALUES ("BlueBird","Joe","Car","f","1999-03-30",NULL);
Query OK, 1 row affected (0.00 sec)
mysql> select * from Bird;
+----------+-------+---------+------+------------+-------+
| name | owner | species | sex | birth | death |
+----------+-------+---------+------+------------+-------+
| BlueBird | Joe | Car | f | 1999-03-30 | NULL |
+----------+-------+---------+------+------------+-------+
1 row in set (0.00 sec)
*/
Drop table Bird;
CREATE TABLE Bird (
name VARCHAR(20),
owner VARCHAR(20),
species VARCHAR(20),
sex CHAR(1),
birth DATE,
death DATE
);
INSERT INTO Bird VALUES ("BlueBird","Joe","Car","f","1999-03-30",NULL);
select * from Bird;
Defining Set Membership:Finding Records in a Set
/*
mysql> SELECT ExamID, SustainedOn, Comments FROM Exam
-> WHERE ExamID IN (2, 7, 3);
+--------+-------------+-----------------+
| ExamID | SustainedOn | Comments |
+--------+-------------+-----------------+
| 2 | 2004-03-13 | C# test |
| 3 | 2005-03-11 | JavaScript Test |
+--------+-------------+-----------------+
2 rows in set (0.00 sec)
*/
/* Prepare the data */
DROP TABLE Exam;
CREATE TABLE Exam (
ExamID INT NOT NULL PRIMARY KEY,
SustainedOn DATE,
Comments VARCHAR(255)
)TYPE = InnoDB;
/* Insert data for testing */
INSERT INTO Exam (ExamID,SustainedOn,Comments) VALUES (1,"2003-03-12","Java Test");
INSERT INTO Exam (ExamID,SustainedOn,Comments) VALUES (2,"2004-03-13","C# test");
INSERT INTO Exam (ExamID,SustainedOn,Comments) VALUES (3,"2005-03-11","JavaScript Test");
/* Real command */
SELECT ExamID, SustainedOn, Comments FROM Exam
WHERE ExamID IN (2, 7, 3);
Performing Range Tests 1
/*
mysql> SELECT ExamID, SustainedOn, Comments FROM Exam
-> WHERE SustainedOn >= "2003-03-20"
-> AND SustainedOn <= "2004-12-31";
+--------+-------------+----------+
| ExamID | SustainedOn | Comments |
+--------+-------------+----------+
| 2 | 2004-03-13 | C# test |
+--------+-------------+----------+
1 row in set (0.01 sec)
*/
/* Prepare the data */
DROP TABLE Exam;
CREATE TABLE Exam (
ExamID INT NOT NULL PRIMARY KEY,
SustainedOn DATE,
Comments VARCHAR(255)
)TYPE = InnoDB;
/* Insert data for testing */
INSERT INTO Exam (ExamID,SustainedOn,Comments) VALUES (1,"2003-03-12","Java Test");
INSERT INTO Exam (ExamID,SustainedOn,Comments) VALUES (2,"2004-03-13","C# test");
INSERT INTO Exam (ExamID,SustainedOn,Comments) VALUES (3,"2005-03-11","JavaScript Test");
/* Real command */
SELECT ExamID, SustainedOn, Comments FROM Exam
WHERE SustainedOn >= "2003-03-20"
AND SustainedOn <= "2004-12-31";
Performing Range Tests 2
/*
mysql> SELECT ExamID, SustainedOn, Comments FROM Exam
-> WHERE SustainedOn BETWEEN "2003-03-20" AND "2005-03-11";
+--------+-------------+-----------------+
| ExamID | SustainedOn | Comments |
+--------+-------------+-----------------+
| 2 | 2004-03-13 | C# test |
| 3 | 2005-03-11 | JavaScript Test |
+--------+-------------+-----------------+
2 rows in set (0.01 sec)
*/
/* Prepare the data */
DROP TABLE Exam;
CREATE TABLE Exam (
ExamID INT NOT NULL PRIMARY KEY,
SustainedOn DATE,
Comments VARCHAR(255)
)TYPE = InnoDB;
/* Insert data for testing */
INSERT INTO Exam (ExamID,SustainedOn,Comments) VALUES (1,"2003-03-12","Java Test");
INSERT INTO Exam (ExamID,SustainedOn,Comments) VALUES (2,"2004-03-13","C# test");
INSERT INTO Exam (ExamID,SustainedOn,Comments) VALUES (3,"2005-03-11","JavaScript Test");
/* Real command */
SELECT ExamID, SustainedOn, Comments FROM Exam
WHERE SustainedOn BETWEEN "2003-03-20" AND "2005-03-11";
Performing Range Tests 3
/*
mysql> SELECT ExamID, SustainedOn, Comments FROM Exam
-> WHERE SustainedOn NOT BETWEEN "2003-03-20" AND "2003-03-24";
+--------+-------------+-----------------+
| ExamID | SustainedOn | Comments |
+--------+-------------+-----------------+
| 1 | 2003-03-12 | Java Test |
| 2 | 2004-03-13 | C# test |
| 3 | 2005-03-11 | JavaScript Test |
+--------+-------------+-----------------+
3 rows in set (0.00 sec)
*/
/* Prepare the data */
DROP TABLE Exam;
CREATE TABLE Exam (
ExamID INT NOT NULL PRIMARY KEY,
SustainedOn DATE,
Comments VARCHAR(255)
)TYPE = InnoDB;
/* Insert data for testing */
INSERT INTO Exam (ExamID,SustainedOn,Comments) VALUES (1,"2003-03-12","Java Test");
INSERT INTO Exam (ExamID,SustainedOn,Comments) VALUES (2,"2004-03-13","C# test");
INSERT INTO Exam (ExamID,SustainedOn,Comments) VALUES (3,"2005-03-11","JavaScript Test");
/* Real command */
SELECT ExamID, SustainedOn, Comments FROM Exam
WHERE SustainedOn NOT BETWEEN "2003-03-20" AND "2003-03-24";
Show current date
/*
mysql> SELECT CURRENT_DATE;
+--------------+
| CURRENT_DATE |
+--------------+
| 2005-10-09 |
+--------------+
1 row in set (0.00 sec)
*/
/* SELECT CURRENT_DATE; */
SELECT CURRENT_DATE;
Use date data type
/*
mysql> select * from employee_person;
+----+-------------------------------------+---------+---------------------------+------------+------+----------+-----------------+----------+
| id | address | phone | email | birthday | sex | m_status | s_name | children |
+----+-------------------------------------+---------+---------------------------+------------+------+----------+-----------------+----------+
| 1 | 200, Regina Street | 7176666 | net@hotmail.ru | 1971-04-26 | M | Y | Ane Regina | NULL |
| 2 | 1232 Alberta Road | 5553312 | jo@hotmail.ru | 1968-03-02 | M | Y | Jane Van | 3 |
| 3 | 90 Potter A | 3331211 | gp@ymail.ru | 1967-09-22 | M | N | Sandhya Pil | 2 |
| 4 | 202, Donna Street | 7176167 | twink@hotmail.ru | 1976-08-09 | F | Y | Manish Sha | NULL |
| 5 | Apartment #8, UBC, Van Street | 8973242 | holy@ymail.ru | 1974-10-14 | F | N | NULL | NULL |
| 6 | 46 SFU Street | 6451234 | kill@el.ru | 1978-12-31 | M | N | NULL | NULL |
| 7 | 432 Mercury Ave | 7932232 | mac@hotmail.ru | 1966-08-21 | M | Y | Mary Shelly | 3 |
| 8 | 8 Little YaleTown | 5442994 | edd@gmail.ru | 1975-01-14 | M | N | NULL | NULL |
| 9 | 64 Temp Road | 4327652 | nan@pmail.ru | 1969-05-19 | M | Y | Man Nanda | 1 |
| 10 | 132 Metro House, Henry Street | 5552376 | ra@hotmail.ru | 1968-07-06 | M | N | NULL | NULL |
| 11 | 1 Grace Town, Van Avenue | 5433879 | soundofsilence@boxer.net | 1957-11-04 | M | Y | Muriel Lovelace | 4 |
| 12 | 97 Oakland Road | 5423311 | kingarthur@roundtable.org | 1968-02-15 | M | Y | Rina Brighton | 3 |
| 13 | 543 Applegate Lane | 3434343 | levy@cmail.ru | 1968-09-03 | F | Y | Matt Shi | 2 |
| 14 | 76 Fish Street | 7432433 | tink@email.ru | 1965-04-28 | M | N | NULL | NULL |
| 15 | 98 Gun Street | 6500787 | danny@fhardy.ru | 1966-06-23 | M | Y | Betty Cudly | 3 |
| 16 | #5 Winnepag Homes | 5433243 | mike@cmail.ru | 1964-03-06 | M | Y | Stella Stevens | 2 |
| 17 | 652 Devon Building, 6th Jade Avenue | 5537885 | mona@darling.ru | 1970-04-18 | F | Y | Edgar Alan | 1 |
| 18 | Apartment #9, Together Towers | 5476565 | odessey@hotmail.ru | 1973-10-09 | M | N | NULL | NULL |
| 19 | Apartment #9, West Towers | 5476565 | jire@hotmail.ru | 1973-01-20 | M | N | NULL | NULL |
| 20 | 90 Yale Town | 7528326 | help@more.org | 1968-01-25 | F | N | NULL | NULL |
| 21 | 4329 Eucalyptus Avenue | 4254863 | money@cold.ru | 1964-06-13 | M | Y | Ruby Richer | 2 |
+----+-------------------------------------+---------+---------------------------+------------+------+----------+-----------------+----------+
21 rows in set (0.00 sec)
mysql> select email, phone
-> from employee_person
-> where birthday = "1969-12-31";
Empty set (0.00 sec)
*/
Drop table employee_person;
CREATE TABLE employee_person (
id int unsigned not null primary key,
address varchar(60),
phone int,
email varchar(60),
birthday DATE,
sex ENUM("M", "F"),
m_status ENUM("Y","N"),
s_name varchar(40),
children int
);
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name) values (1, "200, Regina Street", 7176666, "net@hotmail.ru", "1971-04-26", "M", "Y", "Ane Regina");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name, children) values (2, "1232 Alberta Road", 5553312, "jo@hotmail.ru", "1968-03-02", "M", "Y", "Jane Van", 3);
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name, children) values (3, "90 Potter A", 3331211, "gp@ymail.ru", "1967-09-22", "M", "N", "Sandhya Pil", 2);
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name) values (4, "202, Donna Street", 7176167, "twink@hotmail.ru", "1976-08-09", "F", "Y", "Manish Sha");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status) values (5, "Apartment #8, UBC, Van Street", 8973242, "holy@ymail.ru", "1974-10-14", "F", "N");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status) values (6, "46 SFU Street", "6451234", "kill@el.ru", "1978-12-31", "M", "N");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name, children) values (7, "432 Mercury Ave", 7932232, "mac@hotmail.ru", "1966-8-21", "M", "Y", "Mary Shelly", "3");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status) values (8, "8 Little YaleTown", 5442994, "edd@gmail.ru", "1975-01-14", "M", "N");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name, children) values (9, "64 Temp Road", 4327652, "nan@pmail.ru", "1969-05-19", "M", "Y", "Man Nanda", "1");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status) values (10, "132 Metro House, Henry Street", 5552376, "ra@hotmail.ru", "1968-07-06", "M", "N");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name, children) values (11, "1 Grace Town, Van Avenue", 5433879, "soundofsilence@boxer.net", "1957-11-04", "M", "Y", "Muriel Lovelace", "4");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name, children) values (12, "97 Oakland Road", 5423311, "kingarthur@roundtable.org", "1968-02-15", "M", "Y", "Rina Brighton", 3);
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name, children) values (13, "543 Applegate Lane", 3434343, "levy@cmail.ru", "1968-09-03", "F", "Y", "Matt Shi", "2");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status) values (14, "76 Fish Street", 7432433, "tink@email.ru", "1965-04-28", "M", "N");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name, children) values (15, "98 Gun Street", 6500787, "danny@fhardy.ru", "1966-06-23", "M", "Y", "Betty Cudly", 3);
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name, children) values (16, "#5 Winnepag Homes", 5433243, "mike@cmail.ru", "1964-03-06", "M", "Y", "Stella Stevens", 2);
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name, children) values (17, "652 Devon Building, 6th Jade Avenue", 5537885, "mona@darling.ru", "1970-04-18", "F", "Y", "Edgar Alan", 1);
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status) values (18, "Apartment #9, Together Towers", 5476565, "odessey@hotmail.ru", "1973-10-09", "M", "N");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status) values (19, "Apartment #9, West Towers", 5476565, "jire@hotmail.ru", "1973-1-20", "M", "N");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status) values (20, "90 Yale Town", 7528326, "help@more.org", "1968-01-25", "F", "N");
INSERT INTO employee_person (id, address, phone, email, birthday, sex, m_status, s_name, children) values (21, "4329 Eucalyptus Avenue", 4254863, "money@cold.ru", "1964-06-13", "M", "Y", "Ruby Richer", 2);
select * from employee_person;
select email, phone
from employee_person
where birthday = "1969-12-31";