Enterprise Library DAAB – ADO.NET and Stored Procedures Made Easy

using (DbConnection connection = factory.CreateConnection()) { connection.ConnectionString = connectionString;   using (DbCommand selectCommand = factory.CreateCommand()) { selectCommand.CommandType = CommandType.StoredProcedure; selectCommand.CommandText = "SalesByCategory"; selectCommand.Connection = connection;   DbParameter categoryParameter = selectCommand.CreateParameter(); categoryParameter.ParameterName = "@CategoryName"; categoryParameter.Value = "Beverages";   DbParameter yearParameter =…

Okumaya devam edinEnterprise Library DAAB – ADO.NET and Stored Procedures Made Easy

SQL Server: INSERT INTO with SubQuery

  • Post author:
  • Post category:Genel
  • Post comments:0 Yorum

1 CREATE TABLE [dbo].[Customers]( 2     [id] [int] IDENTITY(1,1) NOT NULL, 3     [name] [varchar](100) NOT NULL, 4     [username] [varchar](20) NOT NULL 5 )     1 CREATE TABLE [dbo].[Orders]( 2     [order_id] [int] IDENTITY(1,1) NOT NULL, 3     [customer_id] [int] NOT NULL, 4     [order_date] [datetime] NOT NULL 5 )…

Okumaya devam edinSQL Server: INSERT INTO with SubQuery