点击上方"数据与人", 右上角选择“设为星标”
分享干货,共同成长!


String sql="select * from table_name where 1=1";
if( conditon 1) {
sql=sql+" and var2=value2";
}
if(conditon 2) {
sql=sql+" and var3=value3";
}
select * from table where 1=1
create table table_name
as
select * from Source_table
where 1=1;
create table table_name
as
select * from
Source_table where 1 <> 1;

文章转载自数据与人,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。