티스토리 뷰
반응형
use employees;
select * from employees;
SELECT * FROM employees.score2;
select name,total,vag from employees.score2 where vag>=70;
select * from employees.employees;
select * from employees.employees where emp_no=110303;
select * from employees.employees;
select * from employees.employees where gender='m' and hire_date <='1990-01-01';
select * from employees.employees where hire_date <='1992-01-01' and month(birth_date) = 9;
select * from employees.employees where (hire_date <'1995-01-01' and gender='F') or (emp_no between 10003 and 10009);
create table empresult (select emp_no,hire_date from employees.employees where first_name like 'm%' or first_name like 'k%');
select * from empresult;
select * from employees.employees where (first_name like 'm%' or first_name like 'k%') and gender='m';
select * from employees.employees where last_name='s%' =
any(select last_name from employees.employees where (first_name like 'm%' or first_name like 'k%' )and gender='M');
create table first_nametest select gender from employees.employees where (first_name like 'm%' or first_name like 'k%');
select * from employees.employees where gender = 'm';
select * from employees.employees where (gender='m') = any(select gender from employees.employees where emp_no <= 10100);
use employees;
SELECT * from employees.employees where (first_name like 'm%' or first_name like 'k%') and gender='M' and last_name =
any(select last_name from employees.employees WHERE last_name like 's%');]
select * from employees where (first_name like 'M%' or first_name like 'K%')
and gender='m' and last_name in(select last_name from employees
where gender='f' and last_name like 's%');
select * from employees where (first_name like 'M%' or first_name like 'K%')
and gender='m' and last_name = any(select last_name from employees
where gender='f' and last_name like 's%');
select gender, count(*) from employees.employees group by gender;
select birth_date,count(*) from employees.employees GROUP BY birth_date;
반응형
'MySQL' 카테고리의 다른 글
190830 mysql in, out 프로시저 (0) | 2019.09.09 |
---|---|
mysql max_allowed_packet 에러 (0) | 2019.09.03 |
190829 기본 명령문 예제 (0) | 2019.08.30 |
190829 DB insert into 기본 (0) | 2019.08.30 |
190829_01 기본문 (0) | 2019.08.30 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- spring 엑셀
- 인텔리제이
- IntelliJ #gradle #tomcat #spring #springmvc
- 엑셀다운로드
- SpringXmlModelInspection
- select제어
- PageNotFound - No mapping for GET
- JSON
- 공백찾기
- Failed to load resource: the server responded with a status of 404 (Not Found)
- JSON날짜
- POI EXCEL
- jQuery
- poi 엑셀
- 이메일 정규식
- 계좌번호정규식
- Spring
- mybatis
- 정규식
- js
- 정규식 숫자만
- spring error #
- Regex
- poi
- ''찾기
- 정규식 특수문자
- no getter for property named
- selectbox
- JSON파싱
- 정규식 한글만
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
글 보관함