본문 바로가기 메뉴 바로가기

수업용 블로그

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

수업용 블로그

검색하기 폼
  • 분류 전체보기 (170)
    • 회사 프로젝트 (0)
    • flutter (1)
    • C (15)
    • C++ (11)
    • API (35)
      • 수업 (8)
      • 과제 (4)
      • DF.project (22)
    • cocos2d (0)
    • Spring (4)
    • HTML&CSS&Javscript&Jquery (22)
    • Unity 3D (5)
      • 팀 프로젝트 (4)
    • JAVA (44)
    • MySQL (11)
    • 웹개발팀프로젝트 (4)
    • Node.js (1)
    • 살면서 다양하게 마주친 에러들(기록용) (17)
    • 오늘의 영어공부 (0)
  • 방명록

MySQL (11)
mysql 에서 '' 값 찾기

where 조건 컬럼명 '' 으로 찾음 된다. null 값 찾으려면 is null, is not null 쓸 것

MySQL 2020. 10. 20. 13:49
190909 mysql trigger

mysql> create table testtbl( id int, txt varchar(10)); mysql> insert into testtbl values (1,'exid'); mysql> insert into testtbl values(2,'gfriend'); mysql> insert into testtbl values(3,'ioi'); mysql> delimiter $$ mysql> create trigger testtg --- 트리거 생성 -> after delete -- 삭제가 되면 발생 -> on testtbl -- testtbl 에 붙여주세요 -> for each row -- 각 행마다 -> begin -> set @msg = 'deleted'; -- 전역변수 msg에 deleted 넣어주..

MySQL 2019. 9. 9. 16:02
190909 고객등급 프로시저

create procedure gProc() begin declare id varchar(10); -- id 저장할 변수 declare g varchar(5); -- 등급 저장할 변수 declare total bigint; -- 합계 저장할 변수 declare endofRow boolean default false; -- 마지막 행인지 판단할 변수 declare usercursor cursor for -- 커서 정의 (한 행 씩 움직이면서 가리키고 있을것) select U.userID , sum(price * amount) from buyTbl B ( buyTbl 에서 U.userID와 가격*갯수의 합계를 가져온다) right outer join userTbl U (userTbl과 join함) on B...

MySQL 2019. 9. 9. 12:18
190906 while 구구단 프로시저

create table gugutbl ( txt varchar(100)); -- 구구단 테이블 정의 delimiter $$ -- 프로시저 정의 시작 create procedure wgugu() -- 구구단 프로시저 만든담 begin -- 시작 declare i int; -- n단 declare k int; -- n declare str varchar(100); -- 출력해야되서 저장할 변수 str set i = 2; -- 2단부터 set k= 1; -- 1~9 까지 while (i

MySQL 2019. 9. 9. 12:17
190830 mysql in, out 프로시저

mysql> delimiter $$ mysql> create procedure sp_nested_loop(in i int, in j int, out x int, out y int, inout z int) -- i, j는 받아오는값, x,y는 리턴되어 출력 되는 값, z는 값을 받아와서 변경되어 리턴되는 값 -> begin ---------내부에서 사용할 a,b,c를 초기화 합니다. -> declare a integer default 0; -- default 초기값 설정 -> declare b integer default 0; -> declare c integer default 0; -> while a while b set b = b+1; -- ..

MySQL 2019. 9. 9. 12:17
mysql max_allowed_packet 에러

전송패킷보다 큰 데이터를 전송하려하면 에러가 난다. use sqldb; create table maxtbl( col1 longtext, col2 longtext); insert into maxtbl values(repeat('a',1000000), repeat('가',1000000)); select length(col1), length(col2) from maxtbl; -- 한글은 2byte 사용하니까 영어의 2배 insert into maxtbl values(repeat('A',10000000), repeat('가',10000000)); -- 용량때문에 에러 my.ini건드려줘야함 select length(col1), length(col2) from maxtbl; 위의 insert는 실행이 되지만 아래..

MySQL 2019. 9. 3. 09:57
190830 기본 명령문 예제

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

MySQL 2019. 8. 30. 17:28
190829 기본 명령문 예제

use sqlDB; select * from userTbl; select userId, Name from userTbl where birthYear >= 1970 And height >=182; select userID, name from userTbl where birthYear >= 1970 or height >=182; select Name, height from userTbl where height >=180 and height 177; select name, height from usertbl WHERE height>(select height from userTbl where Name='김경호'); -- subquery select name, height from usertbl where hei..

MySQL 2019. 8. 30. 17:28
190829 DB insert into 기본

use sqlDB; insert into userTbl values('KKH','김경호', 1971,'전남','019','33333333',177,'2007-7-7'); insert into userTbl values('JYP','조용필',1950,'경기','011','44444444',166,'2009-4-4'); insert into userTbl values('SSK','성시경',1979,'서울',NULL,NULL,186,'2013-12-12'); insert into userTbl values('LJB','임재범',1963,'서울','016','66666666',182,'2009-9-9'); insert into userTbl values('YJS','윤종신',1969,'경남',NULL,NULL,..

MySQL 2019. 8. 30. 17:25
190829_01 기본문

USE studyDB; create table test(id INT); insert into test values(1); insert into test values(110); insert into test values(500); select * from test; create table test1(id int primary key not null, name char(10)); insert into test1 (40, 'test'); select * from test1;

MySQL 2019. 8. 30. 17:24
이전 1 2 다음
이전 다음
공지사항
  • 안녕하세요
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • spring error #
  • spring 엑셀
  • JSON날짜
  • SpringXmlModelInspection
  • Spring
  • poi 엑셀
  • jQuery
  • 정규식 한글만
  • IntelliJ #gradle #tomcat #spring #springmvc
  • Regex
  • selectbox
  • no getter for property named
  • JSON파싱
  • 정규식 특수문자
  • 정규식 숫자만
  • 계좌번호정규식
  • POI EXCEL
  • ''찾기
  • 인텔리제이
  • Failed to load resource: the server responded with a status of 404 (Not Found)
  • JSON
  • 이메일 정규식
  • poi
  • js
  • 정규식
  • select제어
  • mybatis
  • PageNotFound - No mapping for GET
  • 엑셀다운로드
  • 공백찾기
more
«   2025/07   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바