原创 Mybatis實現增刪改查

<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.o

原创 cp: 在"/.../" 後缺少了要操作的目標文件

Linux在複製時總報這個錯誤 看了半天才發現應該是 / dir1/(dir1和前面/間有空格)   

原创 Spring及MyBatis框架搭建

1.Spring框架 分層:SUN提供的EE的三層結構:控制層、業務層、數據訪問層(持久層) struts:web層 Hibernate:數據訪問層 Mybatis:數據訪問層 搭建SSM框架: 1.引入所需jar包 2.配置文件 在s

原创 顯示圖片及傳值

1.網頁中顯示圖片 public void ProcessRequest(HttpContext context)         {             context.Response.ContentType = "image/j

原创 DML:insert ,update,delete

(1)insert: insert into tablename[(columnname,,,)] values(value1,,,);   dept(deptno,dname,loc)   dept(12,'abc','beijing'

原创 子查詢

查詢比7788員工工資高的員工的姓名和工資。  select ename,sal from emp where sal>(select sal from emp where empno=7788); 子查詢: 一個查詢作爲另一個查詢的一部

原创 多表查詢(連接查詢)

多表查詢: 數據來源是多個表,這時注意一定要書寫連接條件。當n個表連接,至少需要n-1個連接條件。 注意:    (1)如何判斷兩個表之間有公共列?  類型一致、寬度一致。(列名不能作爲判斷標準,列名不同也能是公共列 如:emp的empn

原创 加減算式計算

兩個文本框,焦點改變,顯示結果 public class MainActivity extends Activity { EditText etRes,etEquation; protected void onCreate(B

原创 窗體加法運算(int、string相互轉換)

String轉int int iAge = int.Parse(age); int轉String  textBoxRes.Text = num.ToString(); 編寫一個應用程序,完成數字的加法運算。 using System;

原创 冒泡排序 二分查找

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing;

原创 集合運算 rownum decode case

select from where group by having order by; 1、查詢的集合運算:union all (對兩個結果集進行並集操作,包括重複行,不進行排序)                            

原创 輸入一串帶-的數字,輸出-後面的數字

public class MainActivity extends Activity { EditText etName; TextView tvNum; String res; @Override protected voi

原创 第六次課 分組函數

分組函數(聚集函數):count:計數  sum   avg   max   min   查詢emp表有多少位員工?  select count(*) from emp;                                  

原创 第五次課 單行函數及dual

單行函數: 表中每一行都會執行該函數   select sysdate from dept; (1)函數的驗證來源: select sysdate from dual;   select * from tab;              

原创 9.13第三次課

select from where; (1) select * from emp where not(deptno=20 or deptno=30);   deptno in(20,30)     select * from emp wh