# 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
```
