Sponsored Content
Full Discussion: Two databases
Top Forums Shell Programming and Scripting Two databases Post 302542319 by Nitrodist on Wednesday 27th of July 2011 08:24:28 AM
Old 07-27-2011
Quote:
Originally Posted by itkamaraj
Code:
select * from 1.employee
minus 
select * from 2.employee

What kind of SQL syntax is 'minus' ?

Anjali, you're probably looking for a JOIN between the tables.

To answer your question as to the same column name being in both tables, you have to fully qualify each column if their names are shared (actually, it's a good idea to fully qualify with the abbreviated name at this point).

So, if you had two tables, such as Student and Student_Grades, both which had a Student_ID column, you would qualify it as Student.Student_ID and Student_Grades.Student_ID.

The wikipedia article that I linked has a good example of JOINs and the qualified naming that you have to do (in their example, it's an employee and their department).
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ASP and Databases on UNIX?

I have been asked to use ASP on UNIX and I have no idea what the limitations are. I have pages using ASP on NT with SQL7, is there an easy transition for my current pages to work on UNIX? Any help is much appreciated. THX (5 Replies)
Discussion started by: dkropolis
5 Replies

2. UNIX for Dummies Questions & Answers

Unix and databases

I had a person ask me if a Sql database can be run with Unix? I don't know can this be done? They only have Sql dba's and no oracle dba but want to use a Unix box???? (1 Reply)
Discussion started by: tyranunn
1 Replies

3. Cybersecurity

Security Databases are corrupt. HELP!!

Help! SCO Unix 5.05. A relatievely new system went down on me today. I got the dreaded error: Out of Space on Device (1/42). I was able to clear up some space in the /tmp directory, however, when I try to boot, the system prompts me to go into single user mode and I get the... (2 Replies)
Discussion started by: gseyforth
2 Replies

4. UNIX for Dummies Questions & Answers

Checking which databases are installed

I want to check which databases are installed on my FreeBSD installation. This is what I did: pkg_info | grep mysql How do I check all in one go whether also sqlite, postgresql, firebird is installed? Thanks in advance (3 Replies)
Discussion started by: figaro
3 Replies

5. Web Development

Deleting databases in MYSQL problem asking...

Hi, I'm the new user of mysql. I facing one problem to delete one of the database in mysql. Hope can get all of your suggestion and advice. Input: mysql> show databases; +-------------------------+ | Database | +-------------------------+ | information_schema | |... (3 Replies)
Discussion started by: patrick87
3 Replies

6. Solaris

SVM - there are no existing databases.

I am facing problems with SVM installed on vmware workstation on intel platform. I have created replicas and a mirror volume using unmountable slices. But when I reboot my hardware I am not able to execute any SVM cmd's getting an error "there are no existing databases." Below are o/p's of few... (0 Replies)
Discussion started by: rahul_11d
0 Replies

7. UNIX for Dummies Questions & Answers

Diff command with databases

How can we compare query results from different databases using Unix diff command from command-line in Ab Initio tool? (1 Reply)
Discussion started by: eshalife
1 Replies

8. Shell Programming and Scripting

Need help in backing up of databases.

Hi Everyone, I am new to DBA stuff. I wonder if anyone can help me. Task is that, I have 10 databases and need to take backups of all the databases using data pump in Unix/Linux, compress them using gzip and use cron to schedule the job twice a day. Appreciate if anyone can help me in... (1 Reply)
Discussion started by: sreepriya0987
1 Replies

9. Programming

MySQL Databases

Hello all again, How do you guys backup your MySQL databases? I have a few programs that have an default back up that make an .sql file which is great but I also use OpenX which runs on PHP and has a database. That does not have an auto-back-up feature so do I just download the... (2 Replies)
Discussion started by: AimyThomas
2 Replies
Symbol(3pm)						 Perl Programmers Reference Guide					       Symbol(3pm)

NAME
Symbol - manipulate Perl symbols and their names SYNOPSIS
use Symbol; $sym = gensym; open($sym, "filename"); $_ = <$sym>; # etc. ungensym $sym; # no effect # replace *FOO{IO} handle but not $FOO, %FOO, etc. *FOO = geniosym; print qualify("x"), " "; # "Test::x" print qualify("x", "FOO"), " " # "FOO::x" print qualify("BAR::x"), " "; # "BAR::x" print qualify("BAR::x", "FOO"), " "; # "BAR::x" print qualify("STDOUT", "FOO"), " "; # "main::STDOUT" (global) print qualify(*x), " "; # returns *x print qualify(*x, "FOO"), " "; # returns *x use strict refs; print { qualify_to_ref $fh } "foo! "; $ref = qualify_to_ref $name, $pkg; use Symbol qw(delete_package); delete_package('Foo::Bar'); print "deleted " unless exists $Foo::{'Bar::'}; DESCRIPTION
"Symbol::gensym" creates an anonymous glob and returns a reference to it. Such a glob reference can be used as a file or directory handle. For backward compatibility with older implementations that didn't support anonymous globs, "Symbol::ungensym" is also provided. But it doesn't do anything. "Symbol::geniosym" creates an anonymous IO handle. This can be assigned into an existing glob without affecting the non-IO portions of the glob. "Symbol::qualify" turns unqualified symbol names into qualified variable names (e.g. "myvar" -> "MyPackage::myvar"). If it is given a sec- ond parameter, "qualify" uses it as the default package; otherwise, it uses the package of its caller. Regardless, global variable names (e.g. "STDOUT", "ENV", "SIG") are always qualified with "main::". Qualification applies only to symbol names (strings). References are left unchanged under the assumption that they are glob references, which are qualified by their nature. "Symbol::qualify_to_ref" is just like "Symbol::qualify" except that it returns a glob ref rather than a symbol name, so you can use the result even if "use strict 'refs'" is in effect. "Symbol::delete_package" wipes out a whole package namespace. Note this routine is not exported by default--you may want to import it explicitly. perl v5.8.0 2002-06-01 Symbol(3pm)
All times are GMT -4. The time now is 08:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy