SQLCMD -S LOCALHOST -d AdventureWorks -i C:\script.sql -E
You will be able to see the below snippet once the schema and data is successfully loaded to the destination database.
Programming Tips and Tricks - Daily coding tips and tricks regarding C#, .NET, ASP.NET, SQL
SQLCMD -S LOCALHOST -d AdventureWorks -i C:\script.sql -E
SQLCMD -S LOCALHOST -d AdventureWorks -i C:\script.sql -E
@Html.ActionLink("Login", "Login")
<%: Html.ActionLink("Login", "Login") %>
@@identity
always returns the last identity value created in the same session regardless of the table that produced the value, and regardless of the scope of the statement.scope_identity()
returns the identity value created in the same session and the same scope.identity()
is not used to get an identity value but instead is used to create an identity in select...into
statement that is
declaring a column in a table as an identity column.
Here the session means the database connection.
Here is an example:
CREATE TABLE ABC( ID INT IDENTITY(1,1), Name VARCHAR(100) ) INSERT INTO ABC (Name) VALUES ('x') SELECT SCOPE_IDENTITY(), @@IDENTITY
Note:
'Any CPU'
ensures that your application will work on both 32 and 64bit computers.The |DataDirectory| token would expand to an App_Data folder
under the root of a web application.