Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Simple SQL Server Question

Thread Tools
 
Search this Thread
 
Old 18 December 2002, 12:24 PM
  #1  
Scumbag
Scooby Regular
Thread Starter
 
Scumbag's Avatar
 
Join Date: Aug 2001
Posts: 429
Likes: 0
Received 0 Likes on 0 Posts
Post

I'm not particularly au fait with SQL Server, but.......

Is there an equivalent concept to "user qualified tables" within SQL Server. ie in Oracle + DB2, a database or schema can have similarly named tables, but qualified by user id (eg user1.Messages, and user2.messages can happily co-exist with the same, or different, formats) ?

If there is no such concept, and we have to use different databases to hold tables of the same name, is there a simple method of accessing both of these sets of tables without connecting individually to each database?

Sorry it's a bit vague, but any help gratefully received

Cheers

SB
Old 18 December 2002, 12:46 PM
  #2  
GaryK
Scooby Regular
 
GaryK's Avatar
 
Join Date: Sep 1999
Location: Bedfordshire
Posts: 4,037
Likes: 0
Received 0 Likes on 0 Posts
Cool

hey scumbag (nice name!)

yes there is, when creating databases with an admin sign on (typically 'sa') they are created by user 'dbo' so your tablenames can be qualified using dbo.<tablename> (as can stored procs, triggers and views). If you create additional logins for a db then when that user creates a table (assuming they have DDL permissions) then the table is <user>.<tablename>, guess what Im actually saying in answer to your question is YES

cheers

Gary

Old 18 December 2002, 01:44 PM
  #3  
Scumbag
Scooby Regular
Thread Starter
 
Scumbag's Avatar
 
Join Date: Aug 2001
Posts: 429
Likes: 0
Received 0 Likes on 0 Posts
Thumbs up

Excellent - cheers Gary.

In fact exactly how Oracle does it (that'll teach me to scour through the Enterprise manager options, rather than just doing the obvious)

Many thanks

SB (name comes from something I was called at work a few years ago, and it just stuck !!)
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
Brzoza
Engine Management and ECU Remapping
1
02 October 2015 05:26 PM
Phil3822
ScoobyNet General
33
02 October 2015 03:22 AM
Subaruswan
ScoobyNet General
14
01 October 2015 08:05 PM
Phil3822
General Technical
0
30 September 2015 06:29 PM



Quick Reply: Simple SQL Server Question



All times are GMT +1. The time now is 11:36 PM.