Answer the question
In order to leave comments, you need to log in
How to copy a column from one database to another MSSQL?
I understand that this question has been raised 100500 times, but I don’t understand mssql at all, and the essence of the problem is that:
-db1
database -user_account table -uid
column
must be copied to
-db2
database -user_data_ex table -uid
column
but also additionally add 2 more columns to db2>user_data_ex (1\epoch time, September 2\1st, 2018 also at epoch time)
$query4 = new msQuery("INSERT INTO ".$this->db2".dbo.user_data_ex(uid)," Select uid from db1.dbo.user_account where uid='".uid."');
Answer the question
In order to leave comments, you need to log in
Well, at least PHP code can you write correctly?
And how to add columns - I will not prompt, I do not know MsSQL.
Insert into is an insertion of data.
You need to read about alter table add column - this is practically a ready-made command for your purpose, it remains to specify the name of the column and its type
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question