DB/Mysql(DB)
-
MicroSoft - Sql문법DB/Mysql(DB) 2023. 10. 18. 12:07
SELECT stockcd,count(*) FROM biitm01t group by stockcd having count(*) >= 100; -- having은 조건절 --where itemgbn1 ='10' --where itemnm like '%CASE%' --AND (pogbn = '3' or pogbn = '1'); --AND pogbn in('1','3') --where (itemkind = 3 and pogbn = 1) or (itemkind = 2 and pogbn = 2); --where codekind = '102' and (code='2' or code = '3') --where codekind = '102' --where itemkind = 3 --where codekind like ..
-
Mysql(MySQL Workbench) 사용 과 기본 값들DB/Mysql(DB) 2023. 10. 18. 09:18
- MySQL에서 사용되는 다양한 용어들에 대한 설명은 다음과 같습니다: - PK (Primary Key): 기본키로, 각 행을 고유하게 식별하는 역할을 합니다. 즉, 중복된 값을 가질 수 없으며, NULL 값을 가질 수 없습니다. 하나의 테이블에는 하나의 기본키만 존재할 수 있습니다. - NN (Not Null): 해당 열에는 NULL 값을 허용하지 않음을 나타냅니다. 즉, 반드시 값이 존재해야 합니다. - UQ (Unique): 해당 열에 중복된 값을 가지지 않도록 보장합니다. 즉, 모든 값은 유일해야 합니다. - B (Binary): 이진 데이터를 저장할 수 있는 형식입니다. - UN (Unsigned): 해당 열이 양수만을 저장할 수 있음을 나타냅니다. 즉, 음수 값은 허용되지 않습니다. - ZF..