일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Sring Functions and Operators
- MySQL
- 전자정부표준프레임워크
- 방화벽
- 티베로
- Oracle
- HTTP
- String Functions and Operators
- Data and Time Functions
- Date and Time Functions
- Tibero
- Date and Time Function
- 윈도우
- String Function and Operators
- SVN
- 오라클
- String Functions and Date Operators
- 전자정부 표준프레임워크
- Today
- Total
목록MySQL (149)
웹이야기
MySQl 문자열 함수와 연산자 CONCAT_WS() - 문자열 이어붙이는 CONCAT() 의 특별한 형태, 구분자가 함께 한다. CONCAT_WS(sperator, str1, str2) 의 형태 CONCAT_WS() stands for Concatenate With Sperator and is a special form of CONCAT(). The frist argument is the separator for the rest of the arguments. The separator is added between the strings to be concatenated. The sepatator can be a string, as can the rest of the arguments. If the se..
MySQL 문자열 함수와 연산자 CONCAT() - 문자열 이어붙이기 정도 CONCAT(str1, str2...) 의 형태 Returns the string that results from concatenating the arguments. May have one or more arguments. If all arguments are nonbinary strings, the result is a nonbinary string. If the arguments include any binary strings, the result is a binary string. A numeric argument is converted to its equivalent nonbinary string form. CONCAT()..
MySQL 문자열 함수와 연산자 CHARACTER_LENGTH() - CHARACTER_LENGTH(str) 의 형태 CHARACTER_LENGTH() is a synonym for CHAR_LENGTH().
MySQL 문자열 함수와 연산자 CHAR_LENGTH() - CHAR_LENGTH(str) 의 형태 Returns the length of the string str, measured in characters. A multibyte character counts as a single character. This means that for a string containing five 2-byte characters. LENGTH() returns 10, whereas CHAR_LENGTH() returns 5.
MySQL 문자열 함수와 연산자 CHAR() - CHAR(N, ...[USING charset_name]) 의 형태 CHAR() interprets each argument N as an integer and returns a string consisting of the characters given by the code values of those integers. NULL value are skipped. mysql> SELECT CHAR(77, 121, 83, 81, '76'); +-----------------------------+ | CHAR(77, 121, 83, 81, '76') | +-----------------------------+ | MySQL | +-----------------..
MySQL 문자열 함수와 연산자 BIT_LENGTH() - BIT_LENGTH(str) 의 형태 Returns the length of the string str in bits. mysql> SELECT BIT_LENGTH('test'); +--------------------+ | BIT_LENGTH('test') | +--------------------+ | 32 | +--------------------+ 1 row in set (0.00 sec)
MySQL 문자열 함수와 연산자 BIN() - BIN(N) 의 형태 Returns a string representation of the binary value of N. where N is a longlong (BIGINT) number. This is equivalent to CONV(N, 10, 2). Returns NULL if N is NULL. mysql> SELECT BIN(12) ; +---------+ | BIN(12) | +---------+ | 1100 | +---------+ 1 row in set (0.00 sec)
MySQL 문자열 함수와 연산자, ASCII() - 문자열 중에서 가장 왼쪽의 문자열에 대해 숫자값으로 바꿔준다. ASCII(str) 의 형태 Return the numeric value of the leftmost character of the string str. Returns 0 if str is the empty string. Returns NULL if str is NULL. ASCII() works for 8-bit characters. mysql> SELECT ASCII(2); +----------+ | ASCII(2) | +----------+ | 50 | +----------+ 1 row in set (0.00 sec) mysql> SELECT ASCII('DX'); +----------..
MySQL 문자열 함수와 연산자 Name Description ASCII() Return numeric value of left-most character BIN() Return a string containing binary representation of a number BIT_LENGTH Return length of argument in bits CHAR() Return the character for each integer passed CHAR_LENGTH() Return number of characters in argument CHARACTER_LENGTH() Synonym for CHAR_LENGTH() CONCAT() Return concatenated string CONCAT_WS() ..
MySQL 날짜함수, 시간함수 YEARWEEK() - YEARWEEK(date), YEARWEEK(date, mode) 의 형태 Returns year and week for a date. The year in the result may be different form the year in the date argument for the first and the last week of the year. The mode argument works exactll like the mode argument to WEEK(). For the single-argument syntax, a mode value of 0 is used. Unlike WEEK(), the value of default_week_format..
MySQL 날짜함수, 시간함수 YEAR() - YEAR(date) 의 형태 Returns the year for date, in the range 1000 to 9999, or 0 for the "zero" date. mysql> SELECT YEAR(NOW()); +-------------+ | YEAR(NOW()) | +-------------+ | 2020 | +-------------+ 1 row in set (0.00 sec) mysql> SELECT YEAR('2020-04-01'); +--------------------+ | YEAR('2020-04-01') | +--------------------+ | 2020 | +--------------------+ 1 row in set (0.0..
MySQL 날짜함수, 시간함수 WEEKOFYEAR() - WEEKOFYEAR(date) 의 형태 Returns the calendar week of the date as a number in the range from 1 to 53. WEEKOFYEAR() is a compatibility function that is equivalent to WEEK(date, 3). mysql> SELECT WEEKOFYEAR(NOW()); +-------------------+ | WEEKOFYEAR(NOW()) | +-------------------+ | 14 | +-------------------+ 1 row in set (0.00 sec) mysql> SELECT WEEKOFYEAR('2020-04-05'..
MySQL 날짜함수, 시간함수 WEEKDAY() - WEEKDAY([date]) 의 형태 Returns the weekday index for date(0=Monday, 1=Tuesday, ... 6=Sunday) mysql> SELECT WEEKDAY(NOW()); +----------------+ | WEEKDAY(NOW()) | +----------------+ | 6 | +----------------+ 1 row in set (0.00 sec) mysql> SELECT WEEKDAY('2020-04-16'); +-----------------------+ | WEEKDAY('2020-04-16') | +-----------------------+ | 3 | +--------------------..
MySQL 날짜함수, 시간함수 WEEK() - WEEK(date[, mode]) 의 형태 This function returns the week number for date. The two-argument form of WEEK() enables you to specify whether the week starts on Sunday or Monday and whether the return value should be in the range from 0 to 53 or 1 to 53. If the mode argument is omitted, the value of the default_week_format system variable is used. The following table describes..
MySQL 날짜함수, 시간함수 UTC_TIMESTAMP() - UTC_TIMESTAMP, UTC_TIMESTAMP() 의 형태 Returns the current UTC date and time as a value in 'YYYY-MM-DD hh:mm:ss' or YYYYMMDDHHmmss format, depending on whether the function is used in string or numeric context, If the fsp argument is given to sepcifiy a fractional seconds parcision from 0 to 6, the return value includes a fractional seconds part of that many digit..
MySQL 날짜함수, 시간함수 UTC_TIME() - UTC_TIME, UTC_TIME([fsp]) 의 형태 Returns the current UTC time as a value 'hh:mm:ss' or hhmmss format, depending on whether the function is used in string or numeric context. If the fsp argument is given to sepcify a fractional seconds precision form 0 to 6, the return value includes a fractional seconds part of that many digits. mysql> SELECT UTC_TIME(), UTC_TIME+0 ; ..
MySQL 날짜함수, 시간함수 UTC_DATE() - UTC_DATE, UTC_DATE() 의 형태 Returns the current UTC date as a value in 'YYYY-MM-DD' or YYYYMMDD format, depending on whether the function is used in string or numeric context. SELECTmysql> SELECT UTC_DATE(), UTC_DATE()+0 ; +------------+--------------+ | UTC_DATE() | UTC_DATE()+0 | +------------+--------------+ | 2020-04-05 | 20200405 | +------------+--------------+ 1..
MySQL 날짜함수, 시간함수 UNIX_TIMESTAMP() - UNIX_TIMESTAMP([date]) 의 형태 If UNIX_TIMESTAMP() is called with no date argument, it returns a Unix timestamp representing seconds since '1970-01-01 00:00:00' UTC. If UNIX_TIMESTAMP() is called with a date argument, it returns the value of the argument as seconds sincd '1970-01-01 00:00:00' UTC. The server interprets date as a value in the session time zone and..
MySQL 날짜함수, 시간함수 TO_SECONDS() - TO_SECONDS(expr) 의 형태 Given a date or datetime expr, returns the number of seconds since the year 0. If expr is not a valid date or datetime value, returns NULL. mysql> SELECT TO_SECONDS(NOW()); +-------------------+ | TO_SECONDS(NOW()) | +-------------------+ | 63753308673 | +-------------------+ 1 row in set (0.00 sec) mysql> SELECT TO_SECONDS(950501); +--------..
MySQL 날짜함수, 시간함수 TO_DAYS() - TO_DAYS(date) 의 형태 Given a date date, returns a day number(the number of days since year 0) TO_DAYS() is not intended for use with values that precede the advent of the Gregorian calendar(1582), because it does not take into account the days that were lost when the calendar was changed. For dates before 1582(and possibly a later year in other locales), results from t..