generated from Poin-Book/study_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
๐ [Docs] SQL Data Types and Schemas (#4)
- Loading branch information
Showing
2 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
5 changes: 0 additions & 5 deletions
5
Chapter 04 - Intermediate SQL/Item 01 - SQL Data Types and Schemas/Note.md
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
Chapter 04 - Intermediate SQL/Item 05 - SQL Data Types and Schemas/Note.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# SQL Data Types and Schemas | ||
|
||
> ์์ฑ์: ์ต์ ๊ท | ||
## SQL Data Types | ||
|
||
date: | ||
|
||
- YYYY-MM-DD | ||
- ex. 2021-01-01 | ||
|
||
time: | ||
|
||
- HH:MM:SS | ||
- ex. 12:30:00 | ||
|
||
timestamp: | ||
|
||
- YYYY-MM-DD HH:MM:SS | ||
- ex. 2021-01-01 12:30:00 | ||
|
||
interval: | ||
|
||
- ์๊ฐ ๊ฐ๊ฒฉ์ ํํ | ||
- ex. 1 year 2 months 3 days 4 hours 5 minutes 6 seconds | ||
|
||
## Index creation | ||
|
||
```sql | ||
create table student ( | ||
ID varchar (5) primary key, | ||
name varchar (20) not null, | ||
dept_name varchar (20), | ||
tot_cred numeric (3,0) default 0); | ||
|
||
create index studentID_index on student(ID) | ||
``` |