我正在尝试使用ssms中的以下查询在表中插入一行:
INSERT INTO [Reservation].[dbo].[Contacts]
([ContactID]
,[Name]
,[Phone]
,[Email]
,[QoowayUserName])
VALUES
(<"100", nvarchar(50),>
,<"Vincent Chase", nvarchar(50),>
,<"3103331234", nvarchar(50),>
,<"vincent_chase@hollywood.com", nvarchar(50),>
,<"Username", nvarchar(50),>)
GO
我收到错误:
Msg 102, Level 15, State 1, Line 8
Incorrect syntax near '<'.
我也试过使用单引号。我做错了什么?
答案 0 :(得分:4)
INSERT INTO Reservation.dbo.Contacts
(ContactID
,Name
,Phone
,Email
,QoowayUserName)
VALUES
('100'
,'Vincent Chase'
,'3103331234'
,'vincent_chase@hollywood.com'
,'Username')
您可能需要删除&#34; dbo&#34;,如下所示:
INSERT INTO Reservation.Contacts
(ContactID
,Name
,Phone
,Email
,QoowayUserName)
VALUES
('100'
,'Vincent Chase'
,'3103331234'
,'vincent_chase@hollywood.com'
,'Username')