| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
- Pre-processing
- baekjoon
- 문자열
- 백준
- 반복문
- pointer
- Python
- raw data
- string
- 티스토리챌린지
- const
- 오블완
- Object Oriented Programming
- programming
- Data Science
- 포인터
- C++
- vscode
- assignment operator
- 파이썬
- function
- 배열
- Deep Learning
- 알고리즘
- Class
- array
- pass by reference
- 함수
- predictive analysis
- OOP
- Today
- Total
목록SQL (15)
Channi Studies
In this post, we will take a look at two constraints in MySQL—UNIQUE and NOT NULL. UNIQUEUNIQUE constraint ensures that all values in a column are different. We can add a constraint to a table when we create it, or after. Let's make a new table named product, that stores three columns: id, name, and price of the product. Say we don't want any duplicative product id's in the table. We can use UN..
Let's starty by creating a temporary database for this post. CREATE DATABASE test( my_date DATE, my_time TIME, my_datetime DATETIME);SELECT * from test; To get current date, time, or date time, there are 3 built-in functions, CURRENT_DATE(), CURRENT_TIME, and NOW()Let's try inserting a new row of appropriate data obtained by these functions. INSERT INTO testVALUES (CURRENT_DATE(), CURR..
Today, I learned about AUTOCOMMIT, COMMIT, and ROLLBACK keywords in MySQL. AUTOCOMMIT is a mode; by default, AUTOCOMMIT is set to ON. When AUTOCOMMIT is on (by default), every change you make is immediately nad permanently saved. It means that you can't roll back if you made an error because each statement is automatically committed.We can turn it off by using following statement:SET AUTOCOMMIT..
Updating and Deleting Data 지난 포스트에 이어서, 현재 우리가 가지고 있는 데이터는 다음과 같습니다. 여섯번째 행의 데이터, Plankton 데이터의 시급과 취직 날짜가 NULL 인 것을 볼 수 있습니다. 우리는 이 데이터들을 업데이트 하고 싶습니다. 이 때, 우리는 UPDATE 키워드를 사용합니다. UPDATE 키워드에 추가적으로 SET 키워드로 업데이트할 값을 지정해주고, WHERE 키워드로 변경할 대상 row를 특정합니다. UPDATE employeesSET hourly_pay = 15.00WHERE employee_id = 6; We can also update mutiple columns at once, by separating them with commas. (Noti..