Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 view

Author  Topic 

suman.reddy39
Starting Member

34 Posts

Posted - 2008-01-21 : 01:00:33
can we create a view with data into it, without a base table.

SumanReddy.k

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-01-21 : 01:04:48
You can create view to select data from other views, but data are still from base tables eventually.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-01-21 : 08:30:32
quote:
Originally posted by suman.reddy39

can we create a view with data into it, without a base table.

SumanReddy.k


Why do you need this?


create view test_view
as
select * from
(
select 10 as code,'test' as names
) as t

Go

Select * from test_view

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-01-21 : 08:36:22
moved from article discussion

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out
Go to Top of Page

suman.reddy39
Starting Member

34 Posts

Posted - 2008-01-22 : 23:01:15
thanks for your valuable reply

SumanReddy.k
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-01-23 : 00:44:25
quote:
Originally posted by suman.reddy39

thanks for your valuable reply

SumanReddy.k


You didnt tell us why you need this

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -