RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
获取数据库字段小技巧

下面写了几条根据数据库表,获取domain中要用的数据字段sql语句。

让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:申请域名、网络空间、营销软件、网站建设、余干网站维护、网站推广。

select
concat(
concat(column_name,
concat('=',
concat(concat('#{',column_name),'}')
)
),',')

from information_schema.`COLUMNS` where table_schema='saas-export' and table_name='ss_company';

以上sql语句获得的结果如id=#{id},

select
concat(column_name,concat('=',concat(concat('#{',concat(column_name,'}')),',')))
from information_schema.`COLUMNS` where table_schema='saas-export' and table_name='ss_company'

以上sql语句获得的结果如id=#{id},

select column_name,data_type,column_comment from information_schema.COLUMNS where table_schema='saas-export' and table_name='ss_company'
以上sql语句获得的结果如
id varchar ID
name varchar 公司名称



网站标题:获取数据库字段小技巧
文章路径:http://sczitong.cn/article/pdiogp.html