논리연산 (1) 썸네일형 리스트형 [SQL 스터디] 산술 연산 / 논리 연산자 / 비교 연산자 산술연산 SQL구문으로 바로 산술이 가능 SELECT 1+1; //2로 출력 SELECT CustomerID+100 FROM Customers; //Customers에 있는 CustomerID에 100씩 더함(이때 CustomerID가 숫자라서 가능) SELECT CustomerID%2 FROM Customers; //Customers에 있는 CustomerID에 2씩 나눠서 나머지만 출력(이때 CustomerID가 숫자라서 가능) //%2는 홀수/짝수를 알기 위해 많이 사용 || 문자열이나 칼럼을 하나로 합쳐서 출력 SELECT Country || City || Address AS 주소 FROM Customers; SELECT Country || '' || City ||''|| Address AS 주소.. 이전 1 다음