Reputation: 689
Kinda new to Database scripting,
I know I can use Select statement but is that best practice ?
Edit
I tired
Select
table1.column1,
table1.column2,
table2.column1
......
table100.column100 FROM table1,table2,.....table100;
but getting this error
Msg 208, Level 16, State 1, Line 1 Invalid object name 'table1'.
Answer
Few table were deleted by mistake
Upvotes: 0
Views: 64
Reputation: 13496
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,
.....
Upvotes: 1