dbsql.java
来自「掌握 JDBC 驱动程序的加载方法和JDBC-ODBC桥URL的形式; 掌握」· Java 代码 · 共 54 行
JAVA
54 行
package cn.edu.csu.oo.gui.project.dao.common;
public interface DbSql {
//**************************************************************
/**
* 学生操作sql
*/
//**************************************************************
/**
* 添加学生信息sql
*/
public static final String STUDENT_INSERT = "insert into " +
"student values(?,?,?,?,?,?,?,?,to_date(?,'YYYY-MM-DD'))";
/**
*
*/
public static final String STUDENT_SELECT = "select * from student where student_Id = ?";
/**
* 查找学生时使用的sql语句
*/
public static final String SELECT = "select * ";
public static final String STU_ID = "student_id = ? ";
public static final String STU_NAME = " student_name = ?";
public static final String STU_MAJOR = " student_major = ?";
public static final String STU_AND = " and ";
public static final String STU_WHERE = " where ";
public static final String STU_TABLE = " from student ";
public static final String STU_ODER_BY = " order by student_id";
public static final String STU_ALL_SELECT = "select * from student";
/**
* 修改一条学生记录信息
*/
public static final String STUDENT_UPDATE = "update student set student_name = ?, student_sex = ?," +
" student_major = ?, student_grade = ?, student_mail = ?, student_address = ?," +
" student_mobile = ?, student_regist_time = to_date(?,'YYYY-MM-DD') where student_id = ?";
/**
* 根据学号删除一条学生记录
*/
public static final String STUDENT_DELETE="delete from student where student_id = ?";
/**
* 模糊查找
*/
public static final String MOHU_FIND = "select * from book where book_name like ?";
//**************************************************************
/**
* 老师操作sql
*/
//**************************************************************
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?