e9cbf23ab5
이전 재구성 작업에서 Dev/ 폴더가 누락되었던 것을 반영. - Dev/Topic_Programming(중첩 폴더, 78개)은 Dev 자체 최상위 폴더들 (Architecture/Conventions/Engineering_Intelligence 등)과 완전 중복이라 제거. - Dev 최상위 엔지니어링 지식 폴더(Architecture/Conventions/Engineering_Intelligence/ Failure_Library/Generalized_Principles/Language/Pattern_Catalog/Platform_Guides/ Subsystems, 77개)는 이미 Topic_Programming/Topic_Programming에 더 최신 버전이 존재해 중복 제거(고유 콘텐츠 1개는 예외 처리하여 이동 보존). - Dev의 W3Schools 언어 튜토리얼 폴더(Topic_C/CPP/CSS/CSharp/HOWTO/HTML/Java/ JavaScript/PHP/Python/SQL/W3CSS, 1201개)는 전부 Topic_Programming 하위로 이동. - 에이전트 운영 상태(.astra/docs)는 그대로 유지, 콘텐츠 폴더만 정리. - Topic_Programming 최종 문서 수: 2784 → 3985.
4.5 KiB
4.5 KiB
id, title, category, status, verification_status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, created_at, updated_at, review_reason, merge_history, tags, raw_sources, applied_in, github_commit
| id | title | category | status | verification_status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | created_at | updated_at | review_reason | merge_history | tags | raw_sources | applied_in | github_commit | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| sql-wildcards | SQL Wildcards | Database | draft | conceptual |
|
B | 0.88 | 2026-07-04 | 2026-07-04 |
|
|
SQL Wildcards
🎯 한 줄 통찰 (One-line insight)
Beyond % and _, standard SQL wildcards include [] (character set), - (range within brackets), and ^/! (negated set) — but support for these varies significantly by database vendor. [S1]
🧠 핵심 개념 (Core concepts)
- Wildcard character — substitutes one or more characters in a string pattern, used together with the LIKE operator. [S1]
%— zero or more characters._— exactly one character. [S1][]— matches any single character within the brackets, e.g.[bsp]matches "b", "s", or "p". [S1]-— specifies a character range inside[], e.g.[a-f]. [S1]^— matches any character NOT in the brackets (vendor-specific). [S1]{}— matches any escaped character (Oracle only). [S1]
🧩 추출된 패턴 (Extracted patterns)
- Vendor fragmentation —
[]/^/-are NOT supported in PostgreSQL and MySQL;{}is Oracle-only; MS Access uses an entirely different wildcard set (*instead of%,?instead of_,!instead of^,#for a single digit). [S1] - Combinable wildcards —
%and_can be freely combined in one pattern (e.g.'a__%'). [S1]
⚖️ 비교 및 선택 기준 (Comparison & decision criteria)
| 항목 (Option) | 장점 | 단점 | 언제 선택 |
|---|---|---|---|
표준 SQL 와일드카드 (%, _) |
PostgreSQL/MySQL/SQL Server 등 대부분 지원 | 문자 집합/범위 표현 불가 | 이식성이 중요한 경우 |
[]/-/^ 확장 와일드카드 |
문자 집합·범위·부정을 한 패턴에 표현 가능 | PostgreSQL/MySQL 미지원 | SQL Server/Access 등 지원 DB 한정 |
MS Access 전용 와일드카드 (*,?,#,!) |
Access 네이티브 문법과 일치 | 다른 DB로 이식 불가 | MS Access 전용 쿼리 작성 시 |
📖 세부 내용 (Details)
- Character set match:
WHERE CustomerName LIKE '[bsp]%';(starts with b, s, or p). [S1] - Range match:
WHERE CustomerName LIKE '[a-f]%';(starts with a through f). [S1] - Combine
%and_:WHERE CustomerName LIKE 'a__%';(starts with "a", at least 3 characters). [S1] - MS Access wildcard table —
*(zero+ chars),?(single char),[](char set),!(negated set),-(range),#(single digit), e.g.h[oa]tfinds "hot"/"hat" but not "hit". [S1]
⚖️ 모순 및 업데이트 (Contradictions & updates)
- DB별 지원 차이가 소스 자체의 핵심 메시지:
[],^,-는 PostgreSQL/MySQL 미지원,{}는 Oracle 전용, MS Access는 아예 다른 기호 체계(*,?,#,!)를 사용 — 하나의 "SQL 와일드카드" 표준이 사실상 존재하지 않음을 소스가 명시. [S1]
🛠️ 적용 사례 (Applied in summary)
현재 발견된 실제 적용 사례가 없습니다 — SQL Like 챕터에서 소개된 %/_가 여기서 DB별 확장 와일드카드로 심화된다. [S1]
💻 코드 패턴 (Code patterns)
Character-set and range wildcards (SQL, non-MySQL/PostgreSQL):
SELECT * FROM Customers WHERE CustomerName LIKE '[bsp]%';
SELECT * FROM Customers WHERE CustomerName LIKE '[a-f]%';
MS Access equivalent:
h[oa]t -- finds "hot" and "hat", but not "hit"
✅ 검증 상태 및 신뢰도
- 상태: draft
- 검증 단계: conceptual
- 출처 신뢰도: B (W3Schools — widely used educational reference, not a primary standards body)
- 신뢰 점수: 0.88
- 중복 검사 결과: 신규 생성 (New discovery)
🔗 지식 그래프 (Knowledge Graph)
- 상위/루트: SQL Tutorial
- 관련 개념: SQL Like, SQL Where
- 참조 맥락: LIKE 패턴 매칭을 문자 집합/범위 수준으로 확장할 때 참조 — 단, DB 벤더별 지원 여부를 먼저 확인해야 한다.
📚 출처 (Sources)
- [S1] W3Schools — SQL Wildcards — https://www.w3schools.com/sql/sql_wildcards.asp
📝 변경 이력 (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "SQL Wildcards" page (Astra wiki-curation, P-Reinforce v3.1 format).