# how to create database column within developer

**URL:** <https://forum.servoy.com/t/how-to-create-database-column-within-developer/18228>\
**Category:** Classic Servoy\
**Created:** [October 24, 2014, 11:59pm UTC](https://forum.servoy.com/t/how-to-create-database-column-within-developer/18228 "2014-10-24T23:59:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevek](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@stevek](https://forum.servoy.com/u/stevek)\
**Post date:** [October 24, 2014, 11:59pm UTC](https://forum.servoy.com/t/how-to-create-database-column-within-developer/18228/1 "2014-10-24T23:59:41Z")

</div>

Hello All1

I am using Servoy 6.5 and Postgresql 9.3

I need to create a column in a table with properties of JSON to take advantage of the query possibilities it has. Currently I have jsons stored in varchar column and find it very difficult to query specific strings within it.

I can create the column uisng PGAdmin (postgres) ie json\_data and the properties of the column are json

I cannot do this within servoy developer as that choice is not available.

can someone recommend how to create a json column to use in servoy?

Thanks

---

<div class="post-metadata">

**Author:** ![deezzub](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@deezzub](https://forum.servoy.com/u/deezzub)\
**Post date:** [October 27, 2014, 2:21pm UTC](https://forum.servoy.com/t/how-to-create-database-column-within-developer/18228/2 "2014-10-27T14:21:17Z")

</div>

```auto
var server = plugins.maintenance.getServer( serverName );
var table = server.getTable( tableName );
table.createNewColumn( columnName, type, length, allowNull, pkColumn );

```

or maybe you could try

```auto
plugins.rawSQL.executeSQL( serverName, tableName, sql, sql_args );

```

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [October 27, 2014, 3:54pm UTC](https://forum.servoy.com/t/how-to-create-database-column-within-developer/18228/3 "2014-10-27T15:54:09Z")

</div>

> stevek:  
> can someone recommend how to create a json column to use in servoy?

There’s no way to do it from Servoy.  
You need to do this manually.  
Then see what column type the driver is returning in Servoy (probably text)  
Normally the driver should take care of the conversion from Servoy to the JSON data type.

---

<div class="post-metadata">

**Author:** ![stevek](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@stevek](https://forum.servoy.com/u/stevek)\
**Post date:** [October 28, 2014, 2:54am UTC](https://forum.servoy.com/t/how-to-create-database-column-within-developer/18228/4 "2014-10-28T02:54:04Z")

</div>

Thank you!
