sql问题 想实现这样一个查询, 我知道某个字段的长度。。查询字段长度=?的所有记录select * from table where 字段长度=?不知道有没有这样的函数,看了半天帮助没找到如果没有,这样的查询怎么实现呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Lz还是看下JDBC吧~ 需要连接数据库后再执行SQL语句public static Connection getConnection() throws SQLException, IOException { Properties props = new Properties(); FileInputStream in = new FileInputStream("database.properties"); props.load(in); in.close(); String drivers = props.getProperty("jdbc.drivers"); if (drivers != null) System.setProperty("jdbc.drivers", drivers); String url = props.getProperty("jdbc.url"); String username = props.getProperty("jdbc.username"); String password = props.getProperty("jdbc.password"); return DriverManager.getConnection(url, username, password); } select 字段 from table where LENGTH(字段)=?我在informix数据库里这个语句是适用的,不知道对于标准SQL语句能不能通用。 数据库系统设计的一个问题 如何求数的精度 wps密码忘记怎么办?悬赏求解 把数字写到文件中出错 求教 大家来讨论构造方法问题 请问Java有没有工业模拟、控制、监视方面的开源东东啊 请问在DOS中如何搭建JAVA程序的运行环境? 请教关于BigInteger的问题 网页中 怎样做到一副图片 可以跟着鼠标走 大家帮个忙 ORACLE数据库中有一字段类型为LONG,INSERT语句插入不了,PreparedStatement可以吗?可该用哪个取值函数?
public static Connection getConnection()
throws SQLException, IOException
{
Properties props = new Properties();
FileInputStream in = new FileInputStream("database.properties");
props.load(in);
in.close(); String drivers = props.getProperty("jdbc.drivers");
if (drivers != null) System.setProperty("jdbc.drivers", drivers);
String url = props.getProperty("jdbc.url");
String username = props.getProperty("jdbc.username");
String password = props.getProperty("jdbc.password"); return DriverManager.getConnection(url, username, password);
}
我在informix数据库里这个语句是适用的,不知道对于标准SQL语句能不能通用。