SELECT column_name,column_name

FROM table_name;


SELECT DISTINCT column_name,column_name

FROM table_name;


SELECT column_name,column_name

FROM table_name

WHERE column_name operator value;


Operator Description

= Equal

<> Not equal. Note: In some versions of SQL this operator may be written as !=

> Greater than

< Less than

>= Greater than or equal

<= Less than or equal

BETWEEN Between an inclusive range

LIKE Search for a pattern

IN To specify multiple possible values for a column


The AND operator displays a record if both the first condition AND the second condition are true.


The OR operator displays a record if either the first condition OR the second condition is true.


SELECT column_name,column_name

FROM table_name

ORDER BY column_name,column_name ASC|DESC;


INSERT INTO table_name

VALUES (value1,value2,value3,...);


INSERT INTO table_name (column1,column2,column3,...)

VALUES (value1,value2,value3,...);


UPDATE table_name

SET column1=value1,column2=value2,...

WHERE some_column=some_value;


DELETE FROM table_name

WHERE some_column=some_value;


DELETE FROM table_name;

or

DELETE * FROM table_name;


SELECT TOP number|percent column_name(s)

FROM table_name;


MySQL Syntax

SELECT column_name(s)

FROM table_name

LIMIT number;


Oracle Syntax

SELECT column_name(s)

FROM table_name

WHERE ROWNUM <= number;


SELECT column_name(s)

FROM table_name

WHERE column_name LIKE pattern;


SELECT column_name(s)

FROM table_name

WHERE column_name IN (value1,value2,...);


SELECT column_name(s)

FROM table_name

WHERE column_name BETWEEN value1 AND value2;


SQL Alias Syntax for Columns


SELECT column_name AS alias_name

FROM table_name;

SQL Alias Syntax for Tables


SELECT column_name(s)

FROM table_name AS alias_name;



http://www.w3schools.com/sql/sql_join.asp




My SQL / Oracle:

ALTER TABLE table_name

MODIFY COLUMN column_name datatype


Oracle 10G and later:

ALTER TABLE table_name

MODIFY column_name datatype

jQuery Download : http://jquery.com/download/


'Web Develop. > 설치&세팅' 카테고리의 다른 글

이클립스/STS IPv4 출력  (0) 2018.03.06
JAR Library Download & Maven dependency  (0) 2014.10.31
jQuery 다운로드  (0) 2014.10.22
STS 설치 등  (0) 2014.10.13
MySQL 5.0 설치 후 이클립스 연동  (0) 2014.09.16
5. MySQL 5.6 설치  (3) 2014.09.16

+ Recent posts