a.mysql数据库 1.查询mysql中所有数据库名称 select SCHEMA_NAME from information_schema.SCHEMATA 2.查询mysql某个数据库下的所有表名 select TABLE_NAME FROM information_schema.TABLES where TABLE_SCHEMA = '数据库名' 3.授权用户可以在任何主机连接 grant all privileges on *.* to 'username'@'%' identified by 'password' with grant option; b.sqlserver数据库 1.判断表中字段是否存在 select * from syscolumns where id = object_id('表名') and name = '字段名' 2.查询一个库中所有表名 select name from sysobjects where xtype = 'U' //and name like '%a%'
凌云 2019-01-03
linkinqy 2017-05-05
元元 2013-01-18
贺凡 2014-10-25
凌云 2018-10-16
小海 2018-09-18
泡泡 2017-05-07
墨竹 2021-02-23
沙落雁 2018-05-25
雨文 2013-10-13