mysql获取表字段并根据字段名排序
发布网友
发布时间:2022-04-08 19:36
我来回答
共2个回答
热心网友
时间:2022-04-08 21:06
SELECT COLUMN_NAME
FROM `information_schema`.`COLUMNS`
where `TABLE_SCHEMA`='你的架构名' and `TABLE_NAME`='你的表名'
order by COLUMN_NAME;
热心网友
时间:2022-04-08 22:24
public List usersGet(String s1,String s2){
hibernateTemplate.find("FROM USERS where userid =? and time = ? and code = 'XXX'",new String[]);
}
以上是java代码:
如果你是纯sql语句的话
select * from users u where userid = 'xxx' and time='xxx' and code='xxx'