Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Have two table with same name but created by different user

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
saurabh7878
Warnings : 1

New User


Joined: 02 Jun 2005
Posts: 16

PostPosted: Thu Jun 02, 2005 11:20 am    Post subject: Have two table with same name but created by different user
Reply with quote

Hi all
I have a small doubt...
Suppose there are two users ..User1 and User2...
Now both the user create the same table Customer and made them public....
First doubt is that is it possible...
If yes then my second doubt is that i m the third user User3 and access Customer without giving any user name in prefix...which table i m going to view...

Thanks in advance
Saurabh
Back to top
View user's profile Send private message

jkbytes

Active User


Joined: 19 Feb 2005
Posts: 141
Location: South Africa

PostPosted: Thu Jun 02, 2005 2:27 pm    Post subject: Re: Have two table with same name but created by different u
Reply with quote

Hi,

Its quite possible, and if in the case you have created a customer table from user3 it will retreive the data from that table.
Back to top
View user's profile Send private message
saurabh7878
Warnings : 1

New User


Joined: 02 Jun 2005
Posts: 16

PostPosted: Thu Jun 02, 2005 4:19 pm    Post subject: Re: Have two table with same name but created by different u
Reply with quote

Hi Jkbytes
Thanks for the first response ...........But my question is if the third user has not created the table then which table he is going to view...The table created by the USER1 or the table created by the USER2
Back to top
View user's profile Send private message
jkbytes

Active User


Joined: 19 Feb 2005
Posts: 141
Location: South Africa

PostPosted: Thu Jun 02, 2005 5:18 pm    Post subject: Re: Have two table with same name but created by different u
Reply with quote

hi saurabh,

if you are trying to access a table that is not created under your userid, then you may get the following error code when you are trying to retreive the records.

Code:
SQLCODE = -204; ERROR: USER03.CUSTOMER IS AN UNDEFINED NAME.
SQLSTATE  = 42704 SQLSTATE RETURN CODE.
Back to top
View user's profile Send private message
saurabh7878
Warnings : 1

New User


Joined: 02 Jun 2005
Posts: 16

PostPosted: Fri Jun 03, 2005 9:57 am    Post subject: Re: Have two table with same name but created by different u
Reply with quote

Thanks JK for the quick response ...
But still one doubt left and that is why he will not be able to access the table created by the user1 and user2.....They both have created the table and made it pubilc..
Thanks
SAurabh
Back to top
View user's profile Send private message
rajakishore

New User


Joined: 04 Apr 2005
Posts: 10
Location: Hyderabad

PostPosted: Fri Jun 03, 2005 10:08 am    Post subject:
Reply with quote

Hi Saurabh,

User3 has to give an unique identifier to recognize which table he has to access.

Here either he can give User1.Tablename or User2.Tablename

if u give just the Tablename without any qualifier then surely it will throw

error saying Tabelname not found.



Ragards,
Raj
Back to top
View user's profile Send private message
saurabh7878
Warnings : 1

New User


Joined: 02 Jun 2005
Posts: 16

PostPosted: Fri Jun 03, 2005 10:52 am    Post subject: Re: Have two table with same name but created by different u
Reply with quote

Thanks Raj for clearing the doubt
SAurabh
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am
No new posts Adding a userid to SMTP Security table Yolanda Harvey JCL & VSAM 1 Sun Aug 13, 2017 6:16 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us