1 flag 5,964 views
4 4 votes

The 'command' used to change contents of one database using the contents of another database by linking them on a common key field?

  1. Replace
  2. Join
  3. Change
  4. Update
  • 🚩 Low quality | 👮 jacknroll | 💬 “bad question”

4 Answers

3 3 votes

ans is (b)

join clause combines columns from one or more tables in a relationaldatabase. It creates a set that can be saved as a table or used as it is. A JOIN is a means for combining columns from one (self-table) or more tables by using values common to each.

1 1 vote

Answer is B 

Replace command in sql :  Replaces all occurrences of a specified string value with another string value

Change : I don't think any command in db is there with Change key word

Update : Update a record in table

0 0 votes
I guess the answer is b)join .

But join does not change the contents of the database
0 0 votes
D. Update
 
 
Consider a situation:
A table named as USER_DATA is there which contains user details. This table has one column(along with other columns) named as  IS_ACTIVE which contain ‘0’ for a user, when a user will be in-active.
One other table is there named as BLOG_DETAILS which contains columns asAUTHOR_ID, IS_ACTIVE and other column to keep blog details.
Now if we want to run a script which should make column IS_ACTIVE = 0 in theBLOG_DATA table for in-active users. Here, we need a sql script which will containUPDATE with JOIN.
 
BLOG_DETAILS->AUTHOR_ID is foreign key which refers to the primary key USER_DATA->USER_ID
 
We can write the following query
 
UPDATE BLOG_DETAILS SET IS_ACTIVE = 0 FROM BLOG_DETAILS BD INNER JOIN USER_DATA UD ON UD.USER_ID = BD.AUTHOR_ID AND UD.IS_ACTIVE = 0
 
and we are done…
Answer:
Position:
Show:

Related questions

32 32 votes
3 answers 3 answers
15.3k
15.3k views
gatecse asked Sep 21, 2014
15,308 views
Let $f(x)$ be the continuous probability density function of a random variable $x$, the probability that $a < x \leq b$, is :$f(b-a)$$f(b) - f(a)$$\int\limits_a^b f(x) dx...
5 5 votes
2 answers 2 answers
6.9k
6.9k views
go_editor asked Jun 15, 2016
6,927 views
Which of the following contains complete record of all activity that affected the contents of a database during a certain period of time?Transaction logQuery languageRepo...
8 8 votes
6 answers 6 answers
6.8k
6.8k views
Desert_Warrior asked Jun 3, 2016
6,805 views
A locked database file can beAccessed by only one userModified by users with the correct passwordUsed to hide sensitive informationUpdated by more than one user
8 8 votes
2 answers 2 answers
5.2k
5.2k views
Anuanu asked May 30, 2016
5,195 views
Purpose of 'Foreign Key' in a table is to ensureNull IntegrityReferential IntegrityDomain IntegrityNull and Domain Integrity