본문 바로가기

회고(TIL)

2020.06.11 목요일

오늘 한 일

 

W3Schools Online Web Tutorials

HTML Example:

This is a heading

This is a paragraph.

Try it Yourself » CSS Example: body {   background-color: lightblue; } h1 {   color: white;   text-align: ce

 

www.w3schools.com

 

 

  • SQL
    • Structuered Query Language
    • 질의문(검색어), DB용 프로그래밍 언어
  • RDBMS
    • 관계형 데이터베이스 관리 시스템
  • 주요 SQL 문법
    • SELECT * FROM TableName; 데이터 선택
    • SELECT DISTINCT col1, col2 FROM TableName; 중복 값 X
    • SELECT col1, col2 FROM TableName WHERE condition; 조건 추가,  필터링
      • AND, OR, NOT
      • 연산자
        • =, <, >, <=, >=, <>, BETWEEN, LIKE, IN
    • SELECT col1, col2 FROM TableName ORDER BY col1, col2 (DESC)
      • 기본으로는 오름차순, DESC 명시시 내림차순
    • INSERT INTO TableName (col1, col2) VALUES (val1, val2); 새로운 레코드 삽입
    • NULL
      • 값이 없는 경우
      • IS NULL ; null 인가?
      • NOT NULL; null이 아닌가?
    • ALIAS
      • AS, 별칭, 테이블 또는 테이블의 열에 임시 이름을 제공, 여러 개의 테이블을 동시에 조인하거나 비교 연산 시 사용
    • 조인
      • 둘 사이의 관련 열을 기반으로 둘 이상의 테이블의 행을 결합하는데 사용
      • INNER JOIN; 두 테이블에서 일치하는 값을 가진 레코드를 리턴
      • LEFT JOIN; 왼쪽 테이블의 모든 레코드와 오른쪽 테이블의 일치하는 레코드 반환
      • RIGHT JOIN; 오른쪽 테이블의 모든 레코드와 왼쪽 테이블의 일치하는 레코드 반환
      • FULL JOIN; 왼쪽 오른쪽 모든 테이블에 일치하는 레코드 반환
    • 와일드카드 (LIKE)
      •  
% Represents zero or more characters bl% finds bl, black, blue, and blob
_ Represents a single character h_t finds hot, hat, and hit
[] Represents any single character within the brackets h[oa]t finds hot and hat, but not hit
^ Represents any character not in the brackets h[^oa]t finds hit, but not hot and hat
- Represents a range of characters c[a-b]t finds cat and cbt

   (출처 https://www.w3schools.com/sql/sql_wildcards.asp)

 

 

'회고(TIL)' 카테고리의 다른 글

2020.06.15 월요일  (0) 2020.06.15
2020.06.12 금요일  (0) 2020.06.12
2020.06.10 수요일  (0) 2020.06.10
2020.06.09 화요일  (0) 2020.06.09
2020.06.08 월요일  (0) 2020.06.08