698
yesterday 772
visitor 23,540,542
10

mysql 형변환

조회 수 19901 추천 수 0 2012.08.02 17:48:10

http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=qna_db&wr_id=125103

여기 게시물에 답변을 쓰다가 혹시 모르시는분이 거의 안계시겠지만

혹시나 하고 글 올립니다. ^^;;;

------------------------------------------------

[형변환 함수]

CAST(expression AS type)
CONVERT(expression,type)
CONVERT(expr USING transcoding_name)

------------------------------------------------

[타입유형]

* BINARY
* CHAR
* DATE
* DATETIME
* SIGNED
* TIME
* UNSIGNED

CAST()와 CONVERT()는 4.0.2부터 가능하고, CHAR 형변환은 4.0.6부터,
CONVERT()의 USING 형식은 4.1.0부터 가능합니다.

 

 

출처 : http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=57345

*********************************************

[예제]

DROP TABLE IF EXISTS T_CON;
CREATE TABLE T_CON (
no INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
num VARCHAR(20) ,
name VARCHAR(20)
);
INSERT INTO T_CON VALUES
(NULL, '1', '이효리'),
(NULL, '5', '성유리'),
(NULL, '12', '이진'),
(NULL, '14', '옥주현');

SELECT num, name FROM T_CON ORDER BY num;
----------------------
num name
1 이효리
12 이진
14 옥주현
5 성유리
----------------------

SELECT CAST(num AS UNSIGNED) num, name FROM T_CON ORDER BY num;
----------------------
num name
1 이효리
5 성유리
12 이진
14 옥주현
----------------------

 

 

'헬로마켓'과 함께하는 스마트한 중고 아이템 거래

https://www.hellomarket.com


2
profile

Lisa

July 01, 2022
*.77.207.27

Jordan Sneakers Louboutin Shoes Nike Outlet Store Online Shopping Moncler Jackets For Women Jordan 11 New Jordans 2018 Red Bottoms Shoes Nike Shoes Moncler Vest Air Jordan 11s Kyrie Irving Shoes Outlet Golden Goose Pandora Bracelets Louboutin shoes Air Jordan 5 Jordan 12 Yeezy Shoes Jordan 4 Retro Yeezy Shoes Jordan 11's Jordan 12 Retro Moncler Jackets Pandora Jewelry Official Site Nike Air Max 98 Ferragamo Pandora Jewelry Jordan Retro 11 Mens Air Jordan 11 Jordan 11 Air Jordan 4 Jordan 11 Low Jordan Shoes For Women Nike Mens Shoes Nike Shoes Outlet Fitflops Sale Clearance Ferragamo Outlet Golden Gooses Sneakers Red Bottoms Louboutin Nike Outlet Store Yeezy Jordan Retro Air Max 95 Jordans 13 Jordan 6 Retro Golden Goose Outlet Moncler Outlet Online Jordan Retro James Harden Shoes Yeezy ECCO Air Jordan 9 Jordan Retro 5 NMD R1 Pandora Rings Official Site Jordan Retro 8 Nike Air Max 90 Ultra Nike Website Soccer Cleats Fitflop Sandals Air Jordan 1 Nike Air Force 1 Hermes Birkin Golden Goose For Sale Pandora New Nike Shoes 2021 Air Jordans Nike Snkrs Jordan 3 Retro Moncler Yeezys Jordan Sneakers Huaraches Nike Fjallraven Kanken Backpack Nike Air Max 2018 Air Jordan 11 Air Force 1 New Jordans 2021 Air Jordan Jordan 14 Pandora Charms Golden Goose Mid Star Nike Shoes Sale Valentino Sandals Jordan Shoes Golden Goose Shoes Air Jordan 12 Jordan 6 Retro Women Nike Shoes Air Max Moncler Jordan Shoes Yeezy Moncler Store GGDB Sneakers Nike Outlet Store Online Balenciaga Jordan 12 Retro Pandora Jewelry Official Site Air Jordans Jordan 6 Golden Goose Sneakers Jordan Retro GGDB Shoes Jordan Shoes Harden vol 1 Sneakers Golden Goose Red Bottom Shoes New Jordan 11 Air Max 270 Price Nike Shoes For Men Balenciaga Sneakers Jordan 3 NMD R1 Nike Factory Jordan 10 Jordans Sneakers Moncler Coat Pandora Charms Canada Retro Jordans Retro 4 Jordans Pandora Ring Nike Outlet Jordan Sneakers Pandora Jewelry Moncler Outlet Online Jordan 5s Pandora Cheap Jordan Shoes Jordan Win Like 96 Golden Goose Sneakers Pandora Jewelry Official Site Pandora Jewelry GGDB Sneakers Jordan 11 Red Jordan 4 Retro Jordan 11
profile

Katina

July 02, 2022
*.43.11.30

Fitflop Shoes Louboutin Shoes Jordan Shoes Jordan 1 Air Jordan 3 Golden Goose Sneakers Air Jordan Shoes For Men Ferragamo Kyrie Shoes Pandora Charms Golden Gooses Sneakers Red Bottoms Louboutin Nike Mens Shoes Jordan Sneakers Golden Goose Shoes Pandora Air Max Moncler Outlet Nike Air Force Yeezys Air Jordan 5 Retro Jordans 2021 Jordan 11 Low GGDB Adidas Yeezy Air Jordan 6 Jordans Retro Moncler Outlet Online Jordan 4 Retro Air Jordan 11 Balenciaga Triple S GGDB Sneaker Jordan Retro 9 Adidas NMD New Nike Shoes Golden Goose Jordans 11 Retro Pandora Jewelry Jordans 4 Pandora Jewelry Nike Snkrs Harden shoes Jordan 11 Nike Shoes For Women Moncler Coats Red Bottom Shoes Balenciaga Moncler Coat Nike Air Jordan 5 Nike Factory Jordan Retro 11 Jordan 5s Valentino Sneakers Jordan Retro 11 Air Jordan 11's Moncler Outlet Moncler Jackets Jordan 11 Red Air Max 98 Golden Goose Sale Jordan 11s Jordan 11 Air Force 1 Pandora Bracelet Huaraches Nike Nike Outlet Store Pandora Jewelry Official Site Nike Outlet Nike Outlet Air Jordan 4 New Jordans Jordan 4 Retro Christian Louboutin shoes Nike Sale Pandora Canada Jordan Sneakers Yeezy Jordan 10 Air Jordans Yeezy Yeezy Pandora Air Jordan Retro 8 Jordan Shoes Air Jordan Jordan 3 Retro Pandora Jewelry Moncler Sale Outlet Golden Goose Golden Goose Factory Outlet Jordan 12 Retro Adidas NMD R1 New Jordan 11 Birkin Bag Jordan 6 Retro Nike Official Website Cheap Jordans Jackets Moncler Pandora Rings Jordan 12 Nike Shoes For Women Nike Air Max 90 Yeezys Soccer Cleats Air Jordan Air Jordan Sneakers Air Jordan Retro Golden Goose Sneakers Air Jordan 14 Jordan Sneakers Nike Outlet Nike Shoes Pandora Charms James Harden Shoes Golden Goose Mid Stars Win Like 96 Air Max 270 Red Bottom Shoes Moncler Vest GGDB Air Jordan 12 Retro Pandora Jewelry Ferragamo Outlet Online Air Max 2018 Jordan 12 Fjallraven Kanken Jordan Retro Cheap Jordan Shoes Nike Air Max 95 ECCO Jordans Retro Jordan 13s Jordan 6 Rings Pandora Rings Fitflops Sale Clearance Nike Outlet Store Online Shopping
문서 첨부 제한 : 0Byte/ 2.00MB
파일 제한 크기 : 2.00MB (허용 확장자 : *.*)
List of Articles
번호 제목 글쓴이 날짜 조회 수
10 MySQL 소수점 이하 0일때 제거 [1] 제리 2021-08-13 9080
9 mysql 한글 설정 제리 2019-07-18 25097
8 mysql 유저생성, 권한 제리 2017-04-25 18768
7 mysql 덤프 명령및 오류 제리 2015-11-26 101254
6 mysql 컬럼 추가 [1] 제리 2015-07-09 49477
5 [mysql] myisam 과 innodb 뭐가 좋을까? [1] 제리 2015-05-19 24059
4 오토커밋(autocommit) 상태 확인하기 [1] 제리 2014-11-07 14216
3 My Sql 함수정리 제리 2012-08-29 63240
» mysql 형변환 [2] 제리 2012-08-02 19901
1 mysql 문자열 함수 [3] 제리 2011-12-16 18752

Program Note 로그인 :)