0

If I use the the current database named test

USE [test]
GO

DECLARE @test [dbo].[work]

in the file named tt.sql

DECLARE @test [dbo].[work]

It works

However, if I use the code "DECLARE @test [dbo].[work]" only

in another document that use another database (USE [abcd]) named abcd

then I need to add [test].[dbo].[work] but it doesn't work.

What am I missing?

Thank you!

HelloWorld1
  • 13,688
  • 28
  • 82
  • 145
  • 1
    Possible duplicate of http://stackoverflow.com/questions/9581749/user-defined-type-across-databases – diiN__________ May 19 '16 at 08:49
  • Check [Using User-defined Types Across Databases](https://technet.microsoft.com/en-us/library/ms178069%28v=sql.105%29.aspx) – shadow May 20 '16 at 13:06

0 Answers0