728x90
๋ฐ˜์‘ํ˜•

2024/11/14 1

[SQL] ๋ฌธ์ž์—ด ๋ฆฌํ„ฐ๋Ÿด์— ์ž‘์€ ๋”ฐ์˜ดํ‘œ๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ์ด์œ 

SQL์—์„œ ๋ฌธ์ž์—ด ๋ฆฌํ„ฐ๋Ÿด์€ **์ž‘์€ ์ธ์šฉ( ')**๋กœ ๊ฐ์‹ธ์•ผ ํ•ฉ๋‹ˆ๋‹ค. SQL ํ‘œ์ค€(SQL-92)์— ๋”ฐ๋ฅด๋Š” ๊ทœ์น™์ด๋ฉฐ, ๋Œ€๋ถ€๋ถ„์˜ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๊ด€๋ฆฌ ์‹œ์Šคํ…œ(DBMS)์—์„œ๋„ ๋™์ผํ•˜๊ฒŒ ์ ์šฉ๋ฉ๋‹ˆ๋‹ค.๋ฐ˜๋ฉด์— **ํฐ ์ธ์šฉ( ")**์€ ์ผ๋ฐ˜์ ์œผ๋กœ **์‹๋ณ„์ž(์‹๋ณ„์ž)**๋ฅผ ๊ฐ์‹ธ๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ํ…Œ์ด๋ธ” ์ด๋ฆ„์ด๋‚˜ ์—ด์ด SQL ํ‚ค์›Œ๋“œ(์˜ˆ: SELECT, FROM)์™€ ์ถฉ๋Œํ•˜๊ฑฐ๋‚˜ ๊ณต๋ฐฑ์ด ํฌํ•จ๋œ ๊ฒฝ์šฐ ํฐ ์ธ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.๊ตฌ์„ฑ์š”์†Œ:์ž‘์€ ๋ฆฌํ„ฐ( ') : ๋ฌธ์ž์—ด ๋ฆฌํ„ฐ๋Ÿด์— ์‚ฌ์šฉSELECT * FROM employees WHERE name = 'John'; ํฐ ์ธ์šฉ( ") : ์ธ์šฉ(ํ…Œ์ด๋ธ”๋ช…, ์ถ”์ ๋ช…) ๊ฐ์‹ธ๊ธฐSELECT "first name" AS full_name FROM employees;

DB 2024.11.14
728x90
๋ฐ˜์‘ํ˜•