您可以为 SQL 2008 查询设置默认架构吗 [英] Can you set default Schema for SQL 2008 Query

查看:46
本文介绍了您可以为 SQL 2008 查询设置默认架构吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为应用程序的架构.有没有办法,而不是使用语法

I have a schema called application. Is there a way that, rather than using the syntax

SELECT * FROM application.table

我可以设置默认架构以便我可以使用

I can set the default schema so that I can just use

SELECT * FROM table

我想这与 using 语句的想法相同.

It would be the same idea as a using statement I suppose.

推荐答案

所有 sql server 用户的默认架构是dbo",您可以使用命令 ALTER USER

The default schema for all sql server users is "dbo", You can alter the default schema for a user by using commands ALTER USER

ALTER USER UserName WITH DEFAULT_SCHEMA = application;

这篇关于您可以为 SQL 2008 查询设置默认架构吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆