我不小心让SQL Server用户拥有了import javax.swing.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.io.FileNotFoundException;
import java.io.File;
public static void main (String [] args)
{
HashMap <Integer, ArrayList <String>> students = new HashMap <>();
System.out.println ("This program correlates ID with student courses\n");
int currentID;
boolean editing;
while (true) {
System.out.println ("Please enter Student ID: \n(Then enter a -1 when inputs are done)");
Scanner keyboard = new Scanner (System.in);
int ID = keyboard.nextInt();
if(ID == -1) {
break;
}
students.put (currentID = ID, new ArrayList<>());
editing = true;
System.out.println("Enter courses: \n(Once you're done, type \'next\')");
while (editing) {
String course = keyboard.next();
if(course.equalsIgnoreCase("next")) {
editing = false;
} else {
students.get(currentID).add(course);
}
}
}
System.out.println ("Final List: ");
students.forEach((key, value) -> {
System.out.println("Student " + key + ". Courses: " + Arrays.toString(value.toArray()));
});
}
架构。我了解通常要删除此所有权,您需要将其转移给其他用户。
但我不想转移&#34;拒绝&#34;架构到另一个用户。另外我知道你可以创建一个虚假的用户并转移它,但是一旦拥有该架构,你就无法删除该用户吗?
如何摆脱这种情况?
答案 0 :(得分:0)
我想我刚想通了。默认情况下,架构拥有自己。因此,您只需转到架构的属性并将架构所有者置回自身。