Reference

chunjakim·2023년 2월 12일
0

MySQL API

목록 보기
17/18

AUTO_INCREMENT

CREATE TABLE <table>(
    <column> <type> AUTO_INCREMENT
);                                            -- auto increment 설정

ALTER TABLE <table> AUTO_INCREMENT = <value>; -- 시작값 설정

SET @@auto_increment_increment = <value>;     -- 증가값 설정

DISTINCT

SELECT DISTINCT <column> FROM <table>;

Using Variable

SET @<variable> := <value>;
SET @<variable> = <value>;

UNION

<select statement>
UNION <DISTINCT | ALL>
<select statement>

0개의 댓글