表中插入一列:
alter table 表名 add 列名 数据类型
如:alter table student add nickname char(20)
alter table [bitcoin].[dbo].[CoinbaseTransaction] add [OutputValueBtc] numeric(20,8)
执行插入语句后,不会像使用直接增加列一样,出现列无效的问题。
连接:
mysql> SELECT a.runoob_id, a.runoob_author, b.runoob_count FROM runoob_tbl a INNER JOIN tcount_tbl b ON a.runoob_author = b.runoob_author;
insert CoinbaseTransaction
SELECT [bitcoin].[dbo].[TransactionOutput].[OutputValueBtc]
,[bitcoin].[dbo].[TransactionOutput].[OutputScript]
,[bitcoin].[dbo].[TransactionOutput].[OutputIndex]
FROM [bitcoin].[dbo].[TransactionOutput]
INNER JOIN [CoinbaseTransaction] on [bitcoin].[dbo].[TransactionOutput].[BitcoinTransactionId] = [bitcoin].[dbo].[CoinbaseTransaction].[BitcoinTransactionId]