使用prepareStatement对象执行的增、删、改、查sql语句:
查: String sql = "SELECT * FROM 表名 WHERE loginId=? AND password=?";
改: String sql = " update 表名 set name=?,password=? where id=?“;
删: String sql = " delete 表名 set name=?,password=? where id=?“;
增:String sql = " INSERT INTO master ( name, password, money) VALUES (?, ?, ?)“;
alter table test rename test1; --修改表名;
altertable test addcolumnnamevarchar(10); --添加表列;
altertable test dropcolumnname; --删除表列;
altertable test modify address char(10) --修改表列类型;
altertable test change address address char(40); altertable test change column address address1 varchar(30)--修改表列;