2021
02-20
02-20
MySQL版oracle下scott用户建表语句实例
概述:Oraclescott用户下四张表,比较便于做实验,验证数据,现修改为MySQL版本1.部门表--dept2.员工表--emp3.工资等级表--salgrade4.奖金表--bonusdept--CreatetablecreatetableDEPT(deptnoINT(2)notnull,dnameVARCHAR(14),locVARCHAR(13))engine=InnoDBcharset=utf8;--Create/Recreateprimary,uniqueandforeignkeyconstraintsaltertableDEPTaddconstraintPK_DEPTprimarykey(DEPTNO);insertin...
继续阅读 >
1、首先打开SQLPlus窗口,然后窗口会提示你请输入用户名,如图所示2、注意:在输入口令的时候as后面要加个空格即:as+空格+sysdba用户名:sqlplus口令:assysdba3、接下来就是给scott赋予view权限设置,命令如下:grantcreateviewtoscott;4、另外还有一种就是在给scott赋予view权限的同时创建表格(table),命令如下:grantcreatetable,createviewtoscott;5、完成了以上4步操作的时候,我相信有很多初学者在开始的时候...