今天碰到需要给数据库上某一个用户,开通其中2张表的查询权限,方法如下: grant select on bas_checkcycle to jdc;这个是整个语句. 语句分析: grant select on bas_checkcycle to jdc: 这个颜色为执行语句. 这个颜色是数据表 这个颜色是用户:就是需要权限的用户. 下面这个是查看,更新,删除,增加的权限都开启. grant select,update,delete,insert on UserTagPool to [app_we
sqlserver版: 查询当前数据库下所有表名: select * from sys.tables; 查询当前库下,一张表的表名,字段名,字段类型,字段长度: select a.name 表名,b.name 字段名,c.name 字段类型,c.length 字段长度 from sysobjects a,syscolumns b,systypes c where a.id=b.idand a.name='DSE_SYS_DISTRICT' and a.xtype='U'and b.xtype=c
update ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value 建议使用GRANT语句进行授权,语句如下: grant all privileges on *.* to root@'%' identified by "root"; --------------------------------------------------- GRANT SELECT,INSERT,UPDATE,DELETE,
摘自: http://renxiangzyq.iteye.com/blog/763837 update ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value 建议使用GRANT语句进行授权,语句如下: grant all privileges on *.* to root@'%' identified by "root"; -----------------------------------------
SELECT (case when a.colorder=1 then d.name else null end) 表名, a.colorder 字段序号,a.name 字段名, (case when COLUMNPROPERTY( a.id,a.name,'IsIdentity')=1 then '√'else '' end) 标识, (case when (SELECT count(*) FROM sysobjects WHERE (name in (SELECT name FROM sys
利用Oracle中系统自带的两个视图可以实现查看表中主键信息,语句如下:select a.constraint_name, a.column_name from user_cons_columns a, user_constraints b where a.constraint_name = b.constraint_name and b.constraint_type = 'P' and a.table_name = '大写的表名' 查看表的主键约束名称,以及主键约束的字段名称.如果没有,则返
select a.constraint_name, a.column_name from user_cons_columns a, user_constraints b where a.constraint_name = b.constraint_name and b.constraint_type = 'P' and a.table_name = 'AA'-------大写 查看AA表的主键约束名称,以及主键约束的字段名称. 如果没有,则返回空
默认只允许root帐户在本地登录,如果要在其它机器上连接mysql,必须修改root允许远程连接,或者添加一个允许远程连接的帐户,为了安全起见,我添加一个新的帐户: mysql> GRANT ALL PRIVILEGES ON *.* TO 'yangxin'@'%' IDENTIFIED BY 'Yangxin0917!' WITH GRANT OPTION; 允许本地 IP 访问 localhost, 127.0.0.1 create user 'test'@'localhost' iden
今天在QQ群众讨论到一个问题,记录下下来,一边以后用的时候可以翻阅 总结除了三种方法 --方法1,,这一种方法不行,,错误的认识了,@@ROWCOUNT,,,唉,,学艺不精,,丢人啊 SELECT TOP 1 @@ROWCOUNT FROM dbo.tb_CommonDataDict --方法2if exists(SELECT TOP 1 * FROM dbo.tb_CommonDataDict )--方法3if (select Count(*) from a)>0
ALTER TRIGGER [dbo].[PriceRange] ON [dbo].[Tab_SaleAndCarStyle] for update,insert,deleteASdeclare @Saleshop int,@minDfJjSale decimal(18,3),@maxDfJjSale decimal(18,3),@isDfjj varchar(50)set @isDfjj='否' if exists(select 1 from inserted) BEGIN se
create user JSETI_WZQ identified by abcdef; -- 假设abcdef是密码 grant connect,resource to JSETI_WZQ; grant select on LYSDC.ly_xxbz_gxjg_grtxfszl to JSETI_WZQ; grant select on LYSDC.ly_xxbz_gxjg_jzgjcsjzl to JSETI_WZQ; grant select on LYSDC.LY_XXBZ_GXXX_DW
今天要做的测试是:user\db\table_privs\column_privs这四张权限表分别控制哪些级别的权限: 测试准备: [超级用户]root@'127.0.0.1' [操作库权限的用户]grant select on db_test.* to test01@'localhost'; --需要test.t1存在才行 [操作表权限的用户]grant select on db_test.t1 to test02@'localhost' identified by 'xxxx'; --需要t
grant all privileges on [database].* to 'database'@'localhost' identified by 'password' 例如: grant all privileges on mytest.* to 'mytest'@'localhost' identified by '123456'