Notice
Recent Posts
Recent Comments
Link
«   2025/07   »
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
Tags
more
Archives
Today
Total
관리 메뉴

290570

24.06.05 본문

java_spring (2024.05 ~ 2024.10)

24.06.05

qordpsem 2024. 6. 5. 09:29

#자료 조회 데이터베이스 명령어

select 컬럼이름1, 컬럼이름2, .. from 테이블명;

 

ex) student 테이블에서 학생 이름 조회

select name from student;

ex) student 테이블에서 학생 이름, 영어점수 조회

select name, eng from student;

ex) student 테이블에서 모든 속성 조회

select * from student;

 

 

#조건 만족하는 데이터 조회

select 컬럼이름들 from 테이블이름 where 조건식;

 

ex) 국어점수가 80점 이상인 학생들의 이름, 국어점수 조회

select name, kor, from student where kor >= 80;

ex) 이름이 '독도'인 학생의 국어점수 조회

select kor from student where name = '독도';

ex) 이름이 '자바'인 학생의 모든 속성 조회

select * from student where name = '자바';

 

 

'java_spring (2024.05 ~ 2024.10)' 카테고리의 다른 글

오답노트  (0) 2024.06.10
24.06.07  (0) 2024.06.07
5.31 과제  (0) 2024.05.31
24.05.30  (0) 2024.05.30
24.05.29  (0) 2024.05.29