课程: Program Databases with Transact-SQL

今天就学习课程吧!

今天就开通帐号,24,100 门业界名师课程任您挑!

Explore existing views

Explore existing views

- [Instructor] Once you've created a view, you can find them in a couple of different ways. If you're using a graphical interface like we have here, inside of management studio, then you can find them by expanding the database and then finding the views folder, and you'll find them inside of here. This shows me that we have three views inside of the website schema, and these are the ones that come installed with the backup of the WideWorldImporters database, and then we have the two views that we created in the purchasing schema in the prior movie. Now if you're not using a graphical interface, or you'd rather just use a T-SQL command to get this information, you can query a system catalog view called sys.objects. I have that query here on line number six. We're going to select everything, or all the columns, from sys.objects, where the type description equals view. Let's highlight this and execute it to view the results. And here is the same information that we're seeing over here in…

内容