title: What is wrong with this specific t-sql query for a table located on a linked Server?
body: <p>I am using SQL Server 2014 and I have this following simple t-sql query which lists all the columns and their relevant data types from a table on my local database.</p>
  <pre><code>USE [MyDatabase]
  
  exec sp_columns [Table1]
  </code></pre>
  <p>I want to query that same Table which is located on a linked server. However, there must be something wrong in my query as I am getting an &quot;incorrect syntax&quot; error:</p>
  <pre><code>USE [MyDatabase]
  
  exec sp_columns [Server IP].[Database Name on linked Server].dbo.[Table1]
  </code></pre>
  <p>Any help would be appreciated.</p>