在SQL Server中遇到INNER JOIN问题

时间:2017-01-11 01:48:36

标签: sql-server

我试图从只有一个SQL语句的2个表中选择行。有人可以帮我弄清楚如何使这段代码有效吗?

这是我的SQL语句:

new Vue({

  ...

  methods: {

    ...

    deleteEvent: function(index) {
      if (confirm("Are you sure you want to delete this event?")) {
        this.events.$remove(index);
      }
    }
  }
});

1 个答案:

答案 0 :(得分:4)

您必须将Employees表列为您的加入目标:

SELECT * FROM PersonalTable 
INNER JOIN Employees 
ON Employees.PersonalID = PersonalTable.PersonalID 
WHERE Employees.PersonalID= etc