我從來沒有使用SQL Servre,所以這對我來說是完全陌生的。插入行錯誤,錯誤的語法靠近'<'
我有以下插入語句:
INSERT INTO
[dbo].[WEB_static_pages]([url], [template], [title], [metadesc],[metakey])
VALUES
(<url, varchar(255), "test">,
<template, varchar(255), "test.php">,
<title, nvarchar(255), "test title">,
<metadesc, text, "test meta">,
<metakey, text, "test meta key">)
GO
下有三個 '提示' 警告,儘管在SQL Server Management Studio中:
附近有語法錯誤<' 「和」 VARCHAR是不是一個公認的內置函數名
任何人都可以提出什麼問題在這裏?我如何重新格式化我的陳述以適應SQL Server Management Studio?
不能混淆表的定義和插入表中。在SQL服務器中有很多插入的例子。只需尋找10秒 –
@juergend我努力尋找任何在我的問題中使用的語法,這是SQL Server Management Studio生成的語法,因此我認爲這是我所需要的。 –