码迷,mamicode.com
首页 > 数据库 > 详细

牛客网sql练习

时间:2018-03-21 11:48:40      阅读:920      评论:0      收藏:0      [点我收藏+]

标签:nav   table   mysql   records   ace   data   font   coding   local   

一建表语句

/*
Navicat MySQL Data Transfer

Source Server         : test
Source Server Version : 50717
Source Host           : localhost:3306
Source Database       : test

Target Server Type    : MYSQL
Target Server Version : 50717
File Encoding         : 65001

Date: 2018-03-21 09:49:21
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `employees`
-- ----------------------------
DROP TABLE IF EXISTS `employees`;
CREATE TABLE `employees` (
  `emp_no` int(11) NOT NULL,
  `birth_date` date NOT NULL,
  `first_name` varchar(14) NOT NULL,
  `last_name` varchar(16) NOT NULL,
  `gender` char(1) NOT NULL,
  `hire_date` date NOT NULL,
  PRIMARY KEY (`emp_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of employees
-- ----------------------------
INSERT INTO `employees` VALUES (10001, 1953-09-02, Georgi, Facello, M, 1986-06-26);
INSERT INTO `employees` VALUES (10002, 1964-06-02, Bezalel, Simmel, F, 1985-11-21);
INSERT INTO `employees` VALUES (10003, 1959-12-03, Parto, Bamford, M, 1986-08-28);
INSERT INTO `employees` VALUES (10004, 1954-05-01, Chirstian, Koblick, M, 1986-12-01);
INSERT INTO `employees` VALUES (10005, 1955-01-21, Kyoichi, Maliniak, M, 1989-09-12);
INSERT INTO `employees` VALUES (10006, 1953-04-20, Anneke, Preusig, F, 1989-06-02);
INSERT INTO `employees` VALUES (10007, 1957-05-23, Tzvetan, Zielinski, F, 1989-02-10);
INSERT INTO `employees` VALUES (10008, 1958-02-19, Saniya, Kalloufi, M, 1994-09-15);
INSERT INTO `employees` VALUES (10009, 1952-04-19, Sumant, Peac, F, 1985-02-18);
INSERT INTO `employees` VALUES (10010, 1963-06-01, Duangkaew, Piveteau, F, 1989-08-24);
INSERT INTO `employees` VALUES (10011, 1953-11-07, Mary, Sluis, F, 1990-01-22);

1 查找最晚入职员工的所有信息

 

牛客网sql练习

标签:nav   table   mysql   records   ace   data   font   coding   local   

原文地址:https://www.cnblogs.com/feifeicui/p/8615299.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!