i have the following sql select query
select column1,column2 from mytable
is a way to add an empty column to the query that doesnt exist in the table such as
select column1,column2,empty int column from mytable
You can do this like that
select column1,column2,1 as column3 from mytable
_suppno = value ?? int.Parse(DateTime.Now.ToString("ddMMyy") + supplierid); , its more of adding the columns to the datatable rather than having to add them in codeselect column1,column2,1 as column3 from mytablew3 Schools has a good section on this SQL Alter Table Statement.
The specific command would ALTER TABLE table_name ADD column_name datatype
While it does not add the column in a select statement I believe this will accomplish what you are looking for.