# QueryPrepend()

Adds all values of one query the begin to another query. Both queries need to have the same columns.

**Introduced:** 6.0.0.15

```
QueryPrepend( query1=query, query2=query );
```

**Returns:** query

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| query1 | query | Yes | query to add data. |  |
| query2 | query | Yes | query to get data from. |  |

# Examples

```cfml
    testQuery = queryNew( "name , age" , "varchar , numeric" , { name: [ "Susi" , "Urs" ] , age: [ 20 , 24 ] } );
    newTestQuery = queryNew( "name , age" , "varchar , numeric" , [ [ "Smith" , 20 ] , [ "John", 24 ] ]);
    queryPrepend(testQuery, newTestQuery);
    writeDump(testQuery);
```







# Categories

[Queries](../../categories/query.md)

# See Also

[query.prepend()](../objects/query/prepend.md)