0

データベーススクリプティングは初めてですが、

  1. 数十の列から数十の列を表示するスクリプトが必要です。
  2. 10の列の値を10の列から変更するためのスクリプト。

Selectステートメントを使用できることは知っていますが、それがベストプラクティスですか?

編集

疲れた

Select

table1.column1,
table1.column2,
table2.column1
    ......
    table100.column100 FROM    table1,table2,.....table100;

しかし、このエラーが発生します

メッセージ208、レベル16、状態1、行1無効なオブジェクト名'table1'。

答え

誤って削除されたテーブルはほとんどありません

4

1 に答える 1

1
1.Selecting 10's of columns from 10's of columns -- select * from tablename is good way.
But this is not good when you consider the query for performance point of view.If your reuirement is to get all the columns of a table then you can use select * from tablename.

2.This is quite obvious that you have to use all 10 columns if u have to change their values.
UPDATE tablename SETcol1=value1,
       col1=value1,
       col1=value1,
       .....
于 2012-08-06T14:24:12.730 に答える