由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - SQL add some columns into a table from another table
相关主题
求教一个SQL的问题SQL fast search in a 10 million records table
SQL combine two columns from two different tables no shared columnsSQL 面试问题
sql的2个问题问个sql问题
SQL copy a table into a new table and add a new column (转载)被一个面试题卡的泪流满面 SQL
sort two same tables SQL but different results (转载)SQL check likeness between two large tables (转载)
请教个SQL的问题SQL combine two tables into one table and add a new column
SQL find distinct values in large table (转载)error of executing SQL query of string concatenation (转载
SQL multiply all values of a column in table (转载)问个sql 题
相关话题的讨论汇总
话题: table话题: jim话题: sql话题: acct话题: num
进入JobHunting版参与讨论
1 (共1页)
l******9
发帖数: 579
1
On SQL Server 2008 R2, I need to add some columns into a table from another
table.
e.g.
Table1:
name value id
Jim 288 abf
Table 2:
name acct num rank
Jim 12 29 8
Jim 98 95 7
Jim 20 52 9
What I need:
name value id acct num rank acct num rank acct num rank
Jim 288 abf 12 29 8 98 95 7 20 52 9
The record numbers in table 2 may be variable.
Any help would be appreciate.
s****s
发帖数: 2163
2
SQL TABLE 是不能有两个同名的COLUMN的,不知你想干嘛,但是似乎应该是往第二个
TABLE里加个REFERENCE KEY, LINK到第一个TABLE的一个ROW里。

another

【在 l******9 的大作中提到】
: On SQL Server 2008 R2, I need to add some columns into a table from another
: table.
: e.g.
: Table1:
: name value id
: Jim 288 abf
: Table 2:
: name acct num rank
: Jim 12 29 8
: Jim 98 95 7

1 (共1页)
进入JobHunting版参与讨论
相关主题
问个sql 题sort two same tables SQL but different results (转载)
请帮忙回答一个SQL问题请教个SQL的问题
Truncation error import csv file to SQL table (转载)SQL find distinct values in large table (转载)
SQL query 求解!SQL multiply all values of a column in table (转载)
求教一个SQL的问题SQL fast search in a 10 million records table
SQL combine two columns from two different tables no shared columnsSQL 面试问题
sql的2个问题问个sql问题
SQL copy a table into a new table and add a new column (转载)被一个面试题卡的泪流满面 SQL
相关话题的讨论汇总
话题: table话题: jim话题: sql话题: acct话题: num