insert SQL dummy column
HI there..
this is a bit hard to explain so i will show code of the update equivalent ..
declare @dummy as int;
UPDATE pages
SET
@dummy = 0
,field ='asdsa' ... etc
because i am writing a code generator it gets messy trying to determine if a comma is needed or not.. i am having this problem with inserts now.. ive tried this dummy approach but doesnt work... 开发者_开发百科is it possible to force an insert into a column that doesnt exist.. the @dummy works for update, so hoping there is a way for insert..
thanks heaps A
No way to do this on INSERT, unless you have a dummy column in each table.
Of course, my question now is why don't you have defaults and/or parametrization and/or use an ORM and/or use reflection-based solutions...
精彩评论