분류 전체보기
-
1667. Fix Names in a Table oracleLeetCode_Study_Plan/SQL 2022. 9. 27. 12:34
https://leetcode.com/problems/fix-names-in-a-table/ Fix Names in a Table - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com select user_id, initcap(name) as name from users order by user_id; SQL 문법 참고 : https://1day1code.tistory.com/entry/SQL-%EB%AC%B8%EC%9E%90-%ED%95%A8%EC%88%98-LO..
-
205. Isomorphic Strings javaLeetCode_Study_Plan/LeetCode 75 2022. 9. 26. 22:54
https://leetcode.com/problems/isomorphic-strings/?envType=study-plan&id=level-1 Isomorphic Strings - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution { public boolean isIsomorphic(String s, String t) { HashMap map = new HashMap(); int i = 0; while (i < s.length()){ if..
-
196. Delete Duplicate Emails mysqlLeetCode_Study_Plan/SQL 2022. 9. 26. 22:08
https://leetcode.com/problems/delete-duplicate-emails/?envType=study-plan&id=sql-i Delete Duplicate Emails - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com delete from person where id not in ( select sub.min_id from ( select min(id) as min_id, email from person group by email) as ..
-
627. Swap Salary mysqlLeetCode_Study_Plan/SQL 2022. 9. 26. 21:48
https://leetcode.com/problems/swap-salary/?envType=study-plan&id=sql-i Swap Salary - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com UPDATE Salary SET sex = IF (sex = 'f','m','f') SQL의 if는 DDL에서도 사용 가능
-
1873. Calculate Special Bonus mysqlLeetCode_Study_Plan/SQL 2022. 9. 26. 21:42
https://leetcode.com/problems/calculate-special-bonus/?envType=study-plan&id=sql-i Calculate Special Bonus - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com select employee_id, if (employee_id % 2 = 1 AND name NOT LIKE 'M%', salary, 0) as bonus from Employees order by employee_id;
-
MySQL Table 생성 및 컬럼 추가 예제Backend/DB 2022. 9. 26. 15:15
1. Table 생성 CREATE TABLE `essay_user` ( `USER_ID` varchar(100) NOT NULL, `USER_PW` varchar(1000) NOT NULL, `SALT` varchar(1000) NOT NULL, PRIMARY KEY (`USER_ID`) ) 2. Table의 컬럼 추가 ALTER TABLE essay_user ADD COLUMN GRADE VARCHAR(1000) not null, ADD COLUMN REGION VARCHAR(1000), ADD COLUMN SCHOOL VARCHAR(1000), ADD COLUMN PROFILE VARCHAR(1000), ADD COLUMN USER_PW_Q VARCHAR(1000), ADD COLUMN USER_PW..
-
724. Find Pivot Index javaLeetCode_Study_Plan/LeetCode 75 2022. 9. 25. 17:13
https://leetcode.com/problems/find-pivot-index/?envType=study-plan&id=level-1 Find Pivot Index - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution { public int pivotIndex(int[] nums) { int pivot = 0; int total_sum = Arrays.stream(nums).sum(); for(int i = 0; i < nums.le..
-
1480. Running Sum of 1d Array javaLeetCode_Study_Plan/LeetCode 75 2022. 9. 25. 17:01
https://leetcode.com/problems/running-sum-of-1d-array/?envType=study-plan&id=level-1 Running Sum of 1d Array - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution { public int[] runningSum(int[] nums) { Integer[] ans = new Integer[nums.length]; ans[0] = nums[0]; for (int..