INSERT //오늘날짜 자동입력 (sysdate)insert into sale_plan values('1309094885','S12011','xxxxxx',5,25000000,'1/4','1234',sysdate); //기타 포맷형식으로 입력insert into sale_plan values('1309094885','S12011','xxxxxx',5,25000000,'1/4','1234',to_date('09-09-2013 12:14:11','mm-dd-yyyy hh24:mi:ss')); SELECT //포맷에 맞춰서 출력하기select to_char(writerdate, 'yyyy-mm-dd hh24:mi:ss') from sale_plan; 출처 http://blog.naver.com/xerosda..
select initcap(ID) from student where deptno1 = 201; select initcap('Pretty girl') from dual; select name 이름, id, lower(ID) 소문자, upper(id) 대문자 from student where deptno1 =201; select name 이름, id, length(id) 글자수 from student where length(id) > 9; select name 이름, length(name), lengthb(name) from student where deptno1 = 201; select concat(name, position) from professor where deptno=101; select subs..
import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException; public class PreparedStmt {/** * PreparedStatement 테스트 */Connection con; static {try {Class.forName("oracle.jdbc.driver.OracleDriver");} catch (ClassNotFoundException cne) {cne.printStackTrace();}} public void connect() {try {con = DriverManager.getCo..
package Query; import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement; public class CRUDTest {Connection con; static {try {Class.forName("oracle.jdbc.driver.OracleDriver");// JDBC 드라이버 클래스 네임} catch (ClassNotFoundException cne) {cne.printStackTrace();// jar 파일이 존재하지 않을 경우}} public void connect() { // 연결 메소드try {co..
import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement; public class JdbcProg { public static void main(String[] args) {// TODO Auto-generated method stubString jdbc_url = "jdbc:oracle:thin:@localhost:1521:orcl";Connection con;Statement stmt; int empno_s;String name_s;String job_s;// 애트리뷰트 try {Class.forName("orac..
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html 에서Oracle Database 11g Release 2 / (11.2.0.1.0) / Microsoft Windows (32-bit) / 파일 2 개 다운로드다운로드한 2 개의 파일에서 \database\stage\Components 경로 내에 있는 파일 통합 (3개 파일) 설치 후 cmd -> sqlplus -> system/password 로 로그인. 혹은 sqlplus "/as sysdba" 로 로그인(관리자) 관리자 암호 잃어버린 경우command에서 관리자모드로 로그인 후 alter user system identified by 암호; scott ..
- Total
- Today
- Yesterday
- 자바스크립트
- JQuery
- CSS
- 프로젝트
- jsp
- 정보
- 청주
- 졸업작품
- HTML
- ERP
- 안드로이드
- 데이터베이스
- SQL
- 소켓
- 충북대
- 정렬
- 자바
- 배열
- 알고리즘
- 파이썬
- 이론
- 클래스
- 게임
- 도전과제
- 아두이노
- 메모장
- 잡담
- 오라클
- SVN
- db
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |