Microsoft SQL Server 2000 Standard Edition for PC Logo

Related Topics:

senthil kumar Posted on Dec 10, 2007

Sql Server 2005

I had created one table n1 and another as n2 and i want to merge this two tables...

Means if exmple n1 have name, age, and designation and n2 have name, department and i want to make this two table into one as name, age,designation and department into single with query..

Someone help me to do this now only i am in beginner state..

3 Answers

A

Anonymous

Write a query student informatin and marks into the student pass or fail

ARUNASHOK

Level 1:

An expert who has achieved level 1.

  • Contributor 1 Answer
  • Posted on Dec 18, 2007
ARUNASHOK
Contributor
Level 1:

An expert who has achieved level 1.

Joined: Dec 18, 2007
Answers
1
Questions
0
Helped
276
Points
1

"select n1.name,n1.age,n1.designation,n2.department into new_table
from n1,n2
where n1.name=n2.name"

If you want to merge more than two tables you can use "INNER JOIN"

Consider table1 has name & id_no, table2 has id_no & salary, And table3 has id_no & Age.
If we want to merge like to crate a new table has name,age ,salary, Use the given Query

SELECT a.name,b.salary,c.age into newtable
FROM table1 a INNER JOIN table2 b ON a.id_no=b.id_no INNER JOIN table3 c
ON c.id_no=b.id_no

Ad

Anonymous

Level 1:

An expert who has achieved level 1.

  • Contributor 1 Answer
  • Posted on Dec 10, 2007
Anonymous
Contributor
Level 1:

An expert who has achieved level 1.

Joined: Dec 10, 2007
Answers
1
Questions
0
Helped
276
Points
0

Select n1.name,age,department from int newtable n1,n2 where n1.name=n2.name

  • Anonymous Dec 10, 2007

    oops I made a topo



    select n1.name,age.department into newtable from n1,n2 where n1.name=n2.name



    this will give you a table for all the records where the name is in both tables.



    If you want the other records please let me know and I can write those for you too

×

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

0helpful
1answer

Sql query for create table

To create a table use the statement CREATE TABLE use the proper datatype with the proper column name
Ex. CREATE TABLE table_name (
column_name1 datatype,
column_name2 datatype,
column_name3 datatype,
....
);
For more you can refer to w3schools
For more detail visit us

Software development Company Website Designing Development Company
1helpful
2answers

'Table does not exist' error in MySQL, although it really exists

it usually means that no table exists in the default database with the given name. In some cases, it may be that the table does exist but that you are referring to it incorrectly. Maybe your database and table names are case sensitive if they are located on a file system that has case-sensitive file names. Or perhapsall references to a given table within a query must use the same lettercase.
Use SHOW TABLES to check which tables are in the default database.
Well, if you are sure that table is exist and you write its name exactly such it should be, then I suppose something wrong with the database, it can be seriously corrupt. And in this case you need a professional help. This tool must help at any rate - Recovery Toolbox for MySQL https://mysql.recoverytoolbox.com/
0helpful
2answers

Transaction replication is poosible in sql server devlper edition

SQL Server 2005 provides a lot of benefits over SQL Server 2000 including within the replication feature set.

You might be relieved to know that, although most of the benefits accrue on the side of a SQL Server 2005 Publisher, you can still set up SQL Server 2005 as a subscriber on a SQL Server 2000 Publisher. Thus, you can begin to merge in the newest release of SQL Server into an existing replication scheme. You can read more about this at http://msdn2.microsoft.com/en-us/library/ms217330.

Although major advantage to SQL Server 2005 over 2000 is that changes to the schema, such as through ALTER TABLE statements, replicate out to all subscribing servers. The cool news in a mixed version environment is that the ALTER TABLE statements will be published to SQL Server 2000 Subscribers from a SQL Server 2005 Publisher.

Very cool!
0helpful
1answer

How to add more than one record in one row ?

You need to have two tables. One table for the reservation (each reervation having a primary key) and one table to store the people "linked" to that reservation. In the second table, each person will be on a row and one column in your second table would refer to the first (reservation) table in a one-to-many relationship. Read into database design and this will make sense. This can all be done in ADO.NET.
0helpful
4answers

Restoring files from the database

I suggest you use the Enterprise manager (gui tool to manage SQL).
Restoring a single table is not an option.
You can however restore a file or filegroup.
Make sure to backup before you start and NOT to restore database to its original name or original file location, to avoid acidents.
Normally you will have databases with only 2 files: the data at its Primary file group, and log file.
You may wish to create a new file group and move tables to the new group by recreating them there and exporting data from old table to new table. Then recreate indexes. This may prove to be complex as all tables and indexes have unique names and can't coexist with exact duplicate of them.

oh yea..... did I say backup?
well just in case backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup
but dont overwrite that backup
0helpful
1answer

Help me....

You have to creat a table in the SQL server db then you can

 

a) use some windows host script or vb to read your data and insert into the db..

 

b)you can also use the acess:

0695665.jpg

0helpful
3answers

Viewing ms Sql Server database on Access

Are you familiar with "Linking" tables in Access? In Access: File --> Get External Data --> Link Tables. This will bring up a dialog box which allows you to browse to your SQL server and select the table you want.
Not finding what you are looking for?

286 views

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

Grand Canyon Tech
Grand Canyon Tech

Level 3 Expert

3867 Answers

k24674

Level 3 Expert

8093 Answers

Brad Brown

Level 3 Expert

19187 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...