SCHEMA_ID and SCHEMA_NAME functions

Posted by: SQL Server 2005 Distilled, on 20 Nov 2005 | View original | Bookmarked: 0 time(s)

SCHEMA_ID can be used to find out the schema id associated with a schema name, while the SCHEMA_NAME function returns the schema name associated with the specified schema id. If no parameter is passed, the functions return caller's default schema id/name. Try out the following: SELECT SCHEMA_ID(); SELECT SCHEMA_NAME(); SELECT SCHEMA_ID('sys'); SELECT SCHEMA_NAME(4); Here is another example of a script that uses SCHEMA_ID function. The following three SELECT statements use the sys.system_views...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: XSD | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1 | Hits: 0

Similar Posts

  • New Entity Framework Feature CTP for VS2010 Beta 2 more
  • Ambiguous References in DefaultWsdlHelpGenerator.aspx more
  • Improving JavaScript Skills more
  • Using T4 Templates for Simple DTOs more
  • Idle Timeouts in RIA Services Authentication more
  • ClientIDMode in ASP.NET 4.0 more
  • format-DateTime with XSL more
  • A generic way to find ASP.NET ClientIDs with jQuery more
  • Entirely unobtrusive and imperative templates with Microsoft Ajax Library Preview 6 more
  • Private Extension Methods more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD