European Windows 2012 Hosting BLOG

BLOG about Windows 2012 Hosting and SQL 2012 Hosting - Dedicated to European Windows Hosting Customer

SQL Server Hosting - HostForLIFE :: How to Creating Maintaining Utilizing Transactions in SQL Server?

clock July 30, 2024 08:21 by author Peter

In database management, handling transactions is essential to maintaining data consistency and integrity, particularly in settings where several users or programs may be making changes to the data at once. Because of SQL Server's strong support for transactions—including nested transactions—complex operations may be carried out effectively and safely. We shall examine how to handle these transactions in this post using real-world examples.

A Transaction: What Is It?
In SQL Server, a transaction is a series of actions carried out as a single logical work unit. The four primary characteristics of a transaction are atomicity, consistency, isolation, and durability, or ACID for short. These characteristics guarantee that a transaction is finished entirely, that data integrity is maintained, that it is kept apart from other transactions, and that modifications are retained after the transaction is finished.

Establishing and Keeping a Transaction
The BEGIN TRANSACTION statement in SQL Server can be used to start a transaction. This initiates the transaction. Use COMMIT TRANSACTION to successfully save the modifications made throughout the transaction. Use ROLLBACK TRANSACTION if something goes wrong during the transaction and you need to undo the modifications. Here is an example of a simple transaction.

BEGIN TRANSACTION;
UPDATE Hostforlife
SET ViewCount = ViewCount + 1
WHERE ArticleID = 1;
-- Assuming everything is correct
COMMIT TRANSACTION;


In this example, we begin a transaction to update a view count in the Hostforlife table. If the update is successful, we commit the transaction. If there were an error (which is not shown here for simplicity), we could roll back the transaction to undo the changes.

Nested Transactions

Nested transactions occur when a new transaction is started by an instruction within the scope of an existing transaction. SQL Server supports nested transactions. However, it's important to note that SQL Server doesn't truly support nested transactions in the way you might expect—only one transaction can be committed or rolled back, and that affects all nested transactions.

Here's an example:
BEGIN TRANSACTION; -- Outer transaction starts
INSERT INTO Hostforlife (ArticleID, Content)
VALUES (2, 'Introduction to SQL');
BEGIN TRANSACTION; -- Nested transaction starts
UPDATE Hostforlife
SET ViewCount = ViewCount + 1
WHERE ArticleID = 2;
-- Commit nested transaction
COMMIT TRANSACTION;
-- Something goes wrong here, decide to rollback
ROLLBACK TRANSACTION; -- This rolls back both transactions


In this case, the outer transaction is rolled back because of a later issue, even though the nested transaction where we change the view count is committed. All modifications made inside the outer and nested transactions are reversed by this reversal.

Conclusion

Maintaining data consistency and integrity in SQL Server requires the use of transactions and a grasp of how to implement them correctly, including layered transactions. As demonstrated in the "Hostforlife" examples, transactions aid in the safe and dependable management of data updates by guaranteeing that either all or none of a transaction's components are completed, protecting the accuracy and stability of the database.

By mastering transactions, you can ensure your SQL Server databases are robust and error-tolerant, capable of handling complex operations across different scenarios.

HostForLIFE.eu SQL Server 2022 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.




SQL Server Hosting - HostForLIFE :: What Makes SQL Server DELETE and TRUNCATE Different?

clock July 24, 2024 09:01 by author Peter

It is common to need to remove data from tables when dealing with SQL Server. For this operation, the DELETE and TRUNCATE commands are two popular approaches. Despite their apparent similarities, they differ significantly in ways that can affect recovery, data integrity, and performance. These variations are thoroughly examined in this article.

DELETE Statement
The DELETE statement is used to remove rows from a table based on a specified condition. It is a DML (Data Manipulation Language) command.

Key Characteristics of DELETE

  • Condition-Based Removal
    • The DELETE statement can remove specific rows that match a condition. For example.
    • DELETE FROM Employees WHERE Department = 'HR';
  • If no condition is specified, it will remove all rows.

DELETE FROM Employees;

  • Transaction Log: DELETE operations are fully logged in the transaction log. This means each row deletion is recorded, which can be useful for auditing and recovery purposes.
  • Trigger Activation: DELETE statements can activate DELETE triggers if they are defined on the table. Triggers allow for additional processing or validation when rows are deleted.
  • Performance: Deleting rows one at a time and logging each deletion can make DELETE operations slower, especially for large datasets.
  • Space Deallocation: After deleting rows, the space is not immediately reclaimed by SQL Server. It remains allocated to the table until a REBUILD or SHRINK operation is performed.
  • Foreign Key Constraints: DELETE operations respect foreign key constraints. If there are related records in other tables, you must handle these constraints explicitly to avoid errors.


TRUNCATE Statement
The TRUNCATE statement is used to remove all rows from a table quickly and efficiently. It is a DDL (Data Definition Language) command.

Key Characteristics of TRUNCATE

  • Removing All Rows: TRUNCATE removes all rows from a table without the need for a condition.

    TRUNCATE TABLE Employees;

  • Transaction Log: TRUNCATE operations are minimally logged. Instead of logging each row deletion, SQL Server logs the deallocation of the data pages. This results in a smaller transaction log and faster performance for large tables.
  • Trigger Activation: TRUNCATE does not activate DELETE triggers. This means that any logic defined in DELETE triggers will not be executed.
  • Performance: Because TRUNCATE is minimally logged and does not scan individual rows, it is generally faster than DELETE for large tables.
  • Space Deallocation: TRUNCATE releases the space allocated to the table immediately, returning it to the database for reuse.
  • Foreign Key Constraints: TRUNCATE cannot be executed if the table is referenced by a foreign key constraint. To truncate a table with foreign key relationships, you must either drop the foreign key constraints or use DELETE instead.
  • Reseed Identity Column: When TRUNCATE is used, the identity column (if present) is reset to its seed value. For example, if the table has an identity column starting at 1, it will restart at 1 after truncation.

Summary of Differences

Feature DELETE TRUNCATE
Rows Affected Can delete specific rows or all rows Removes all rows in the table
Logging Fully logged (row-by-row) Minimally logged (page deallocation)
Triggers Activates DELETE triggers Does not activate triggers
Performance Slower for large tables Faster for large tables
Space Deallocation Space not immediately reclaimed Space immediately reclaimed
Foreign Key Constraints Respects foreign key constraints Cannot be used if the foreign key exists
Identity Column Not reset Reset to the seed value

Conclusion
Which option you choose between DELETE and TRUNCATE will rely on your operation's particular needs. When you need to respect foreign key constraints, remove particular rows, or activate triggers, use DELETE. When you need to efficiently recover space from a table by removing all of its rows rapidly and when there are no foreign key limitations to take into account, go with TRUNCATE. You may optimize your database operations and make well-informed decisions by being aware of these variances.

HostForLIFE.eu SQL Server 2022 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.



SQL Server Hosting - HostForLIFE :: Inner Workings of a Query Processor

clock July 19, 2024 08:03 by author Peter

An integral part of a database management system (DBMS) is a query processor, which interprets and runs user queries so that users can efficiently communicate with the database. It guarantees that searches are handled effectively and yield the intended outcomes. Here, we examine a query processor's essential features, including its parts and operations.

Query Processor


 

Linker and Compiler
In the query processing pipeline, the compiler and linker are essential components. High-level queries defined in Data Definition Language (DDL) or Data Manipulation Language (DML) are translated by the compiler into machine code or lower-level code that the database engine can run. These compiled code fragments are subsequently combined by the linker into a cohesive entity that is prepared for execution. This procedure is similar to the compilation and linking process used to create executable programs from traditional programming languages.

DML Queries

Data Manipulation Language (DML) queries are used to manipulate the data within a database. Common DML operations include.

  • SELECT: Retrieve data from the database.
  • INSERT: Add new records to the database.
  • UPDATE: Modify existing records.
  • DELETE: Remove records from the database.

The query processor interprets these queries, optimizes them, and ensures they are executed efficiently, maintaining data integrity and performance.DDL InterpreterThe Data Definition Language (DDL) interpreter is responsible for handling DDL commands that define the database schema. DDL commands include.

  • CREATE: Define new database objects like tables, indexes, and views.
  • ALTER: Modify the structure of existing database objects.
  • DROP: Delete database objects.

The DDL interpreter ensures that these commands are correctly parsed and executed, updating the database schema as required.

Application Program Object Code
Application programs use embedded SQL queries to communicate with the database. The query processor initially writes these questions in the application code before compiling them into object code. The executable form of the SQL queries is represented by the object code, which enables smooth database interaction between the application and the database.

DML Compiler and Organizer

DML queries are converted into an intermediate form by the DML compiler, which also optimizes them for quick execution. This intermediate form is typically a list of simple operations that the query evaluation engine is able to perform on its own. After these queries are created, the organizer puts them into an ideal execution plan so that the database engine can run them quickly.

Query Evaluation Engine
The main element in charge of carrying out the compiled and optimized queries is the query evaluation engine. It performs the necessary actions to retrieve or alter data as described in the query by processing the intermediate code that is produced by the DML compiler. The query optimizer's defined optimization strategies are followed by the evaluation engine, which guarantees efficient execution.

Conclusion
A query processor is a sophisticated component of a DBMS, integrating various functions to ensure efficient query processing. From compiling and linking queries to interpreting DDL commands and executing DML operations, each component plays a crucial role in maintaining the performance and integrity of the database. Understanding these components helps in appreciating the complexity and efficiency of modern database management systems.

HostForLIFE.eu SQL Server 2022 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.



SQL Server Hosting - HostForLIFE :: SQL's RANK, DENSE_RANK, and ROW_NUMBER ranking functions

clock July 12, 2024 09:23 by author Peter

With the use of SQL's ranking functions, you may give each row in a result set's partition a unique ranking. These functions come in very handy when you have to determine the row order according to certain standards. The RANK(), DENSE_RANK(), and ROW_NUMBER() functions are the three main ranking functions. Despite their apparent similarity, they exhibit different habits, particularly with regard to handling ties. We'll examine these functions in-depth and provide a useful example to illustrate how they differ in this post.

RANK()
The RANK() function assigns a unique rank to each row within a partition of a result set, with gaps in the ranking sequence where there are ties. This means that if two or more rows have the same value in the ordering column(s), they will be assigned the same rank, but the next rank will be incremented by the number of tied rows.

Syntax

RANK() OVER (
    PARTITION BY column1, column2, ...
    ORDER BY column1, column2, ...
)


Example
SELECT
    Name,
    Score,
    RANK() OVER (ORDER BY Score DESC) AS Rank
FROM
    Students;

Result

| Name    | Score | Rank |
|---------|-------|------|
| Alice   | 95    | 1    |
| Bob     | 85    | 2    |
| Charlie | 85    | 2    |
| Dave    | 75    | 4    |
| Eve     | 70    | 5    |

In this example, Bob and Charlie have the same score and are both ranked 2nd. The next rank, assigned to Dave, is 4th, leaving a gap at rank 3.

In this example, Bob and Charlie have the same score and are both ranked 2nd. The next rank, assigned to Dave, is 4th, leaving a gap at rank 3.
DENSE_RANK()

The DENSE_RANK() function is similar to RANK() but without gaps in the ranking sequence. When rows have the same value in the ordering column(s), they receive the same rank, but the next rank is incremented by one, regardless of the number of ties.

Syntax

DENSE_RANK() OVER (
    PARTITION BY column1, column2, ...
    ORDER BY column1, column2, ...
)


Example
SELECT
    Name,
    Score,
    DENSE_RANK() OVER (ORDER BY Score DESC) AS DenseRank
FROM
    Students;

Result
| Name    | Score | DenseRank |
|---------|-------|-----------|
| Alice   | 95    | 1         |
| Bob     | 85    | 2         |
| Charlie | 85    | 2         |
| Dave    | 75    | 3         |
| Eve     | 70    | 4         |

Here, Bob and Charlie are both ranked 2nd, but the next rank is 3rd, assigned to Dave, with no gaps in the ranking sequence.

ROW_NUMBER()
The ROW_NUMBER() function assigns a unique sequential integer to rows within a partition, without considering ties. Each row gets a distinct number, even if there are ties in the ordering column(s).
Syntax
ROW_NUMBER() OVER (
    PARTITION BY column1, column2, ...
    ORDER BY column1, column2, ...
)


Example
SELECT
    Name,
    Score,
    ROW_NUMBER() OVER (ORDER BY Score DESC) AS RowNum
FROM
    Students;


Result

| Name    | Score | RowNum |
|---------|-------|--------|
| Alice   | 95    | 1      |
| Bob     | 85    | 2      |
| Charlie | 85    | 3      |
| Dave    | 75    | 4      |
| Eve     | 70    | 5      |

In this example, even though Bob and Charlie have the same score, they are assigned unique row numbers 2 and 3, respectively.

HostForLIFE.eu SQL Server 2022 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.



SQL Server Hosting - HostForLIFE :: Getting Started with MSSQL and ASP.NET Core with Docker-Compose

clock July 5, 2024 09:37 by author Peter

Containerization has emerged as a critical strategy in today's software development environment for effectively managing and distributing programs. Docker streamlines the development, testing, and deployment process by packaging applications and their dependencies into isolated containers. By defining multi-container applications, Docker Compose greatly simplifies duties related to ASP.NET Core and MSSQL. We'll go over how to build up an MSSQL database and an ASP.NET Core application in a Docker Compose environment in this article.

Step 1. Create an ASP.NET Core Application
First, let's create a new ASP.NET Core application. Open your terminal and run the following commands:
dotnet new webapi -o AspNetCoreDocker
cd AspNetCoreDocker


This will create a new ASP.NET Core Web API project in the AspNetCoreDocker directory.
Step 2. Add a Dockerfile
Next, add a Dockerfile to define how the ASP.NET Core application should be built and run inside a container. Create a file named Dockerfile in the project root and add the following content:
# Use the official ASP.NET Core runtime as a parent image
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80

# Use the SDK image to build the app
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["AspNetCoreDocker.csproj", "."]
RUN dotnet restore "AspNetCoreDocker.csproj"
COPY . .
WORKDIR "/src/"
RUN dotnet build "AspNetCoreDocker.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "AspNetCoreDocker.csproj" -c Release -o /app/publish

# Copy the build output to the runtime image
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "AspNetCoreDocker.dll"]


Step 3. Add a Docker Compose File
Now, let's create a Docker Compose file to define the multi-container application. Create a file named docker-compose.yml in the project root and add the following content:
version: '3.4'

services:
  web:
    image: aspnetcoredocker
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "5000:80"
    depends_on:
      - db

  db:
    image: mcr.microsoft.com/mssql/server:2019-latest
    environment:
      SA_PASSWORD: "Your_password123"
      ACCEPT_EULA: "Y"
    ports:
      - "1433:1433"

Step 4. Configure the ASP.NET Core Application to Use MSSQL
Update the appsettings.json file in the ASP.NET Core project to configure the connection string for the MSSQL database:

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=db;Database=master;User=sa;Password=Your_password123;"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*"
}


Next, update the Startup.cs file to use the connection string:
public void ConfigureServices(IServiceCollection services)
{
    services.AddControllers();
    services.AddDbContext<ApplicationDbContext>(options =>
        options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
}

Step 5. Build and Run the Application with Docker Compose
With everything set up, it's time to build and run the application using Docker Compose. In the terminal, run the following command:
docker-compose up --build

Docker Compose will build the ASP.NET Core application image, pull the MSSQL image, and start both containers. The ASP.NET Core application will be accessible at http://localhost:5000, and the MSSQL database will be running on localhost:1433.

Step 6. Verify the Setup
To verify that the setup is working correctly, you can create a simple controller in the ASP.NET Core application that connects to the MSSQL database and performs basic operations. For example, you can create a WeatherForecastController that retrieves data from the database.
Conclusion

Docker Compose makes it easy to manage multi-container applications, and with the steps outlined in this article, you can set up a robust development environment for your ASP.NET Core application and MSSQL database. By containerizing your application, you ensure consistency across different environments and streamline the deployment process. Happy coding!

HostForLIFE.eu SQL Server 2022 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.




SQL Server Hosting - HostForLIFE :: Primary Key and Unique Keys

clock July 1, 2024 07:01 by author Peter

In Database Management Systems, both Primary Key and Unique key constraints play crucial roles in preserving sharpness of the Data stored. Both make sure of distinctness across a column or group(columns) with some differences.

Primary Key Constraints

  • Uniqueness: A primary key constraint enforces that all values in the designated primary key column be unique. Primary key constraint can only have one per table.
  • Not Null : A primary key column will not accept NULL value. Every row must have a non empty primary key value.
  • Single Column or Composite: The primary key can be made of a single column or more than one (composite primary key).
  • Default Indexing: A clustered index will be created on the columns that define a primary key by default. The clustered index is also stored on a b-tree and it sorts the table data according to the primary key, increasing query performance when joining witht he same keys as in this case.
  • It will provide a way to maintain the relationships between tables - The primary key of one table can be referenced as a foreign key in another table.
  • Unique Primary Key: A table must have one primary key constraint, and it can be a combination of more than 1 column.

Unique Key Constraints

  • Uniqueness: Uniqieness Key constraint also makes sure that all the values in Unique key columns are unique. Even though, you can have multiple unique constraints for a table.
  • Nullable: Unique key columns can contain NULL s, although each NULL is unique in this case unlike primary keys cells.
  • Single Column or Composite: As for the primary key, unique keys could also be defined in a single column manner or composite.
  • Index :An index itself in non-clustered type and is usually created on unique key column. The unique key index is designed to accelerate searches or filters based on the unique key.
  • Foreign Keys: Unique keys can also be referenced as foreign key in other tables.
  • Multiple Unique Keys: A table may have more than one unique key constraint

Primary KeyUse a primary keywhenever you want to ensure every row in the table has its own unique identifier. Usually the main entity which is represented in a table

Unique key is used when you want to ensure unique values for a column or set of columns and that value(s) doesn't form main identifier in the table. You can also have multiple unique keys thus enforcing the uniqueness on different columns combinations.

User Table

  • Primary Key: user_Id (guaranteed unique identifier for each user)
  • Unique Key: user_Email (ensures no duplicate email addresses)

CREATE TABLE users (
    user_id INT PRIMARY KEY,
    user_email VARCHAR(255) UNIQUE,
    user_name VARCHAR(50) UNIQUE,
    user_fullName VARCHAR(100)
);
-- user_id is the Primary Key
-- user_email and user_name are the Unique Keys

Examples
Primary Key Table Structure.
-- First SQL Statement
CREATE TABLE tbl_students (
    student_id INT PRIMARY KEY,
    first_name VARCHAR(50),
    last_name VARCHAR(50),
    date_of_birth DATE
);

-- Second SQL Statement
CREATE TABLE [tbl_students](
    [student_id] [int] NOT NULL,
      NULL,
      NULL,
    [date_of_birth] [date] NULL,
    PRIMARY KEY CLUSTERED
    (
        [student_id] ASC
    ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO


Primary Key and Unique Key Table Structure.
CREATE TABLE tbl_employees (
    employee_id INT PRIMARY KEY,
    email VARCHAR(255) UNIQUE,
    phone_number VARCHAR(20) UNIQUE,
    first_name VARCHAR(50),
    last_name VARCHAR(50)
);


employee_id is the primary key and email, and phone_number is the unique key.
CREATE TABLE [tbl_employees](
    [employee_id] [int] NOT NULL,
      NULL,
      NULL,
      NULL,
      NULL,
    PRIMARY KEY CLUSTERED
    (
        [employee_id] ASC
    ) WITH (
        PAD_INDEX = OFF,
        STATISTICS_NORECOMPUTE = OFF,
        IGNORE_DUP_KEY = OFF,
        ALLOW_ROW_LOCKS = ON,
        ALLOW_PAGE_LOCKS = ON,
        OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF
    ) ON [PRIMARY],
    UNIQUE NONCLUSTERED
    (
        [phone_number] ASC
    ) WITH (
        PAD_INDEX = OFF,
        STATISTICS_NORECOMPUTE = OFF,
        IGNORE_DUP_KEY = OFF,
        ALLOW_ROW_LOCKS = ON,
        ALLOW_PAGE_LOCKS = ON,
        OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF
    ) ON [PRIMARY],
    UNIQUE NONCLUSTERED
    (
        [email] ASC
    ) WITH (
        PAD_INDEX = OFF,
        STATISTICS_NORECOMPUTE = OFF,
        IGNORE_DUP_KEY = OFF,
        ALLOW_ROW_LOCKS = ON,
        ALLOW_PAGE_LOCKS = ON,
        OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF
    ) ON [PRIMARY]
) ON [PRIMARY]
GO


The primary key has a clustered index and the unique key has non clustered index.

Composite Keys

It is used as a primary key or a unique key, involving combining multiple columns to uniquely identify a row in a database table.

Example

Composite Primary Key: A primary key can consist of a single column or multiple columns.
CREATE TABLE tbl_enrollments (
    student_id INT,
    course_id INT,
    enrollment_date DATE,
    PRIMARY KEY (student_id, course_id)
);


student_id, and course_id are used to create composite primary key.
CREATE TABLE [tbl_enrollments](
    [student_id] [int] NOT NULL,
    [course_id] [int] NOT NULL,
    [enrollment_date] [date] NULL,
    PRIMARY KEY CLUSTERED
    (
        [student_id] ASC,
        [course_id] ASC
    ) WITH (
        PAD_INDEX = OFF,
        STATISTICS_NORECOMPUTE = OFF,
        IGNORE_DUP_KEY = OFF,
        ALLOW_ROW_LOCKS = ON,
        ALLOW_PAGE_LOCKS = ON,
        OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF
    ) ON [PRIMARY]
) ON [PRIMARY]
GO

Composite Unique Key: A table can have multiple unique key constraints.
CREATE TABLE tbl_orders (
    order_id INT PRIMARY KEY,
    product_id INT,
    customer_id INT,
    order_date DATE,
    UNIQUE (product_id, customer_id)
);


product_id and customer_id are used to create a composite unique key.
CREATE TABLE [tbl_orders](
    [order_id] [int] NOT NULL,
    [product_id] [int] NULL,
    [customer_id] [int] NULL,
    [order_date] [date] NULL,
    PRIMARY KEY CLUSTERED
    (
        [order_id] ASC
    ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY],
    UNIQUE NONCLUSTERED
    (
        [product_id] ASC,
        [customer_id] ASC
    ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO


The query file is attached.

HostForLIFE.eu SQL Server 2022 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.



About HostForLIFE.eu

HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2016 Hosting, ASP.NET Core 2.2.1 Hosting, ASP.NET MVC 6 Hosting and SQL 2017 Hosting.


Tag cloud

Sign in