# runScript {#runscript}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`runScript(script)`

## Arguments {#arguments}

**Script** is a string indicating the script to be executed.

## Details {#details}

Locally execute a script. It must be executed by a logged-in user.

## Examples {#examples}

```
t = table(1..100 as id,201..300 as val1)
script1 = 'dn = "dfs://test";if(existsDatabase(dn)){dropDatabase(dn)};db = database(dn,VALUE,1..10);pt = db.createPartitionedTable(t,`pt,`id).append!(t)'
script2 = 'select * from loadTable("dfs://test",`pt)'
runScript(script1)
runScript(script2)
```

