1.两个不同数据库对应字段相应操作 //操作模版:insert into data2.table2(字段1,字段2,字段) select 字段j,字段k,字段m from data1.table1举例:insert into Hospitals.dbo.Deparments(DepartmentName) select distinct(Departments)from NanFan.dbo.UserInfo where Unit='南方医院'//更新update Hospitals.dbo.U
最近在学MYSQL,慢慢更新吧 推荐好书:SQL必知必会.靠这本书入了个门 以下均为MYSQL方式提交 Duplicate Emails select Email from Person group by email having count(*) >1 Employees Earning More Than Their Managers select E1.name as Employee from Employee as E1,Employee as E2 where E1.ManagerI
1.创建用户 SQL> -- 例如创建一个用户名为xiaoming,密码为a123的用户 SQL> create user xiaomingidentified by a123; 用户已创建. SQL> show user USER 为 "SYS" 2.给用户授予权限 SQL> -- 给用户xiaoming授予权限 SQL> grant connect,resource,dba to xiaoming; 授权成功. SQL> -- 登录xiaomin