Giter Site home page Giter Site logo

daily-sql's Introduction

Hi there πŸ‘‹

This is ✨ special ✨repository of SoA-Lee.


Anurag's github stats


πŸ›  Tech Stack πŸ› 


Β  Β  Β  Β  Β  Β  Β  Β  Β 


✨ BOJ ✨


Solved.ac Profile

daily-sql's People

Contributors

devycha avatar soa-lee avatar

Watchers

 avatar

daily-sql's Issues

MySQL : REGEXP (Regular Expression(μ •κ·œ ν‘œν˜„μ‹))

μ •κ·œ ν‘œν˜„μ‹μ΄λž€?

μ •κ·œ ν‘œν˜„μ‹μ€ νŠΉμ •ν•œ κ·œμΉ™μ„ 가진 λ¬Έμžμ—΄μ˜ 집합을 ν‘œν˜„ν•˜λŠ”λ° μ‚¬μš©ν•˜λŠ” ν˜•μ‹ 언어이닀.
λ¬Έμžμ—΄μ„ μ²˜λ¦¬ν•˜λŠ” 방법 μ€‘μ˜ ν•˜λ‚˜λ‘œ,
νŠΉμ •ν•œ 쑰건의 문자λ₯Ό β€˜κ²€μƒ‰β€™ν•˜κ±°λ‚˜ β€˜μΉ˜ν™˜β€™ν•˜λŠ” 과정을 맀우 κ°„νŽΈν•˜κ²Œ μ²˜λ¦¬ν•  수 μžˆλ„λ‘ ν•΄μ£ΌλŠ” μˆ˜λ‹¨μ΄λ‹€.

  1. νŒ¨ν„΄ 맀칭에 μ˜ν•œ 검색 : LIKE

    • %λ‚˜ _λ₯Ό μ‚¬μš©ν•˜κ³  싢을 λ•ŒλŠ” escape 문자 μ‚¬μš©ν•˜κΈ°
  2. μ •κ·œ ν‘œν˜„μ‹ : REGEXP

    • LIKE보닀 λ³΅μž‘ν•œ λ¬Έμžμ—΄ 쑰건으둜 검색 κ°€λŠ₯
# '달' λ˜λŠ” '곡" λ˜λŠ” 'κΉƒ'κ°€ ν¬ν•¨λœ λ¬Έμžμ—΄μ„ μ°Ύκ³  싢을 λ•Œ

# μ •κ·œν‘œν˜„μ‹μ„ μ‚¬μš©ν•˜μ§€ μ•Šμ„ λ•Œ
SELECT *
FROM tbl
WHERE data like '%달%'
OR data like '%곡%'
OR data like '%κΉƒ%'

# μ •κ·œν‘œν˜„μ‹μ„ μ‚¬μš©ν•  λ•Œ
SELECT *
FROM tbl
WHERE data REGEXP '달|곡|κΉƒ'
# '달' λ˜λŠ” '곡" λ˜λŠ” 'κΉƒ'으둜 μ‹œμž‘ν•˜λŠ” λ¬Έμžμ—΄μ„ μ°Ύκ³  싢을 λ•Œ

# μ •κ·œν‘œν˜„μ‹μ„ μ‚¬μš©ν•  λ•Œ
SELECT DISTINCT CITY
FROM STATION
WHERE CITY REGEXP '^[달곡깃]'

# '달' λ˜λŠ” '곡" λ˜λŠ” 'κΉƒ'으둜 λλ‚˜λŠ” λ¬Έμžμ—΄μ„ μ°Ύκ³  싢을 λ•Œ

# μ •κ·œν‘œν˜„μ‹μ„ μ‚¬μš©ν•  λ•Œ
SELECT DISTINCT CITY
FROM STATION
WHERE CITY REGEXP '[달곡깃]$'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.