# Update whole table fast

1. Right Click --> Edit top 200 Rows
2. Select the sides and delete
3. Copy new data from Excel or other source
4. Select the Side with <mark style="color:green;">\*</mark> and insert
5. Check if data is correct with <mark style="color:orange;">`SELECT * FROM <table_name>`</mark>

To execute procedures use:

```sql
exec <PROCEDURE_NAME> 'PARAM1' 'PARAM2';
```

{% hint style="info" %}
Note:

If you have multiple excel entries that need to be updated by the same procedure you can use the following excel formula to update each row individually

* Adjust cells in excel from the formula with the corresponding ones

```sql
="exec `PROCEDURE NAME` `'"&E2&"' , '"&C2&"',  '"&A2&"'";`
```

{% endhint %}

To select database table with timestamps use:

```sql
Begin
    declare @now datetime2 = sysdatetime();
    print 'Exported all data from TABLENAME table at system time=' + convert(char(20), @now, 121)
    select * from TABLENAME
End
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arkannis.net/database/ms-sql/update-whole-table-fast.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
