Re: insert question Bill Karwin wrote:
> Jeff wrote:
>> I want to insert a row where several columns have the same initial
>> value. Is there a way to do this without repeating the value multiple
>> times on the insert command? E.g., instead of
>>
>> INSERT INTO Table1 (Column1, Column2, Column3.)
>> VALUES (Value, Value, Value .)
>>
>> something like this:
>> insert into table1 (column1, column2, column3...)
>> values (3xValue...)
>
> No, there is no syntax in SQL for what you describe.
>
> The only other solution I can think of right now is to declare that
> value as the DEFAULT for the columns in question, and then do not give a
> value for them in the insert statement.
>
> Regards,
> Bill K.
Defaults get my vote. Anything else would make me wonder about the
design of the database. |