There are multiple ways
to do this.
1)
INSERT INTO SELECT
This method is used when
table is already created in the database earlier and data have to be inserted
into this table from another table. If columns listed in the INSERT clause and
SELECT clause are same, listing them is not required.
INSERT INTO table-name (column-names)
SELECT column-names
FROM table-name
WHERE condition
2) SELECT INTO
This method is used when
table is not created earlier and it needs to be created when data from one
table must be inserted into a newly created table from another table. The new
table is created using the same data types as those in selected columns.
select * into dbo.CopyTo from dbo.CopyFrom
3)
INSERT BY VALUE
By using a values clause to specify
the data values for one row.
INSERT INTO MyTable (Column1, Column2)
VALUES
(‘Column1Value’, Column2 Value.')
3) INSERT BY VALUE
By using a values clause to specify
the data values for one row.
INSERT INTO MyTable (Column1, Column2)
VALUES
(‘Column1Value’, Column2 Value.')
Data is the business asset for any organisation which is audited and protected. To gain in their business, it is become very urgent for every organization to choose few good predictive data models and validates them using test data before figuring out an operationalization plan for the model to be deployed to production so that applications can consume it.
ReplyDeleteArtificial intelligence with SQL Server