자바스크립트
DOM
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
</body>
</html>
inner.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<button onclick="inntext()">innerText로 표시하기</button>
<button onclick="innhtml()">innerHTML로 표시하기</button>
<h1>현재시간</h1>
<div id="current"></div>
<script>
const now = new Date();
function inntext(){
document.getElementById("current").innerText = now;
}
function innhtml(){
document.getElementById("current").innerHTML = "<em>" + now + "</em>";
}
</script>
</body>
</html>
오라클
Update 예제 연습
update dept_temp2
set dname = 'DATABASE',
loc = 'NEW YORK'
where deptno = 40;
update emp_temp2
set comm = 50
where sal <=2500;
update dept_temp2
set (dname, loc) = (select dname, loc
from dept
where deptno = 40)
where deptno = 40
update dept_temp2
set loc = 'SEOUL'
where deptno = (select deptno
from dept_temp2
where dname = 'OPERATIONS');