what is database view?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2022 03:52 AM
how to create database view?and what are the beast practices to use database view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2022 05:36 AM
Hi Sanem,
as already the topic is explained bit, I'll be short:
Database view is a join of two or more tables where you can have only read access. This is something like a report or a view, where you can see but not touch. No extra licenses here needed, this is not a new table, but rather a query (spaking in PL/SQL this is a virtual table, created by the query (the JOIN query you use).
Hope this bring a bit of light here 🙂
Cheers,
Joro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2022 05:40 AM
Additionally - you cannot join one table 🙂 You can need at least two segments for a join to work - speaking stricly in ServiceNow terms! Although, you can join a table wth itself, like this (the code below)) :
changeCategory : function(previous, cat) {
var dbu = new GlideDBUpdate('cmdb_ci');
var dbq = new GlideDBQuery('cmdb_ci');
dbq.addQuery('category', previous.category.toString());
dbq.addQuery('sys_class_name', cat.name.toString());
dbu.setQuery(dbq);
dbu.setMultiple(true);
dbu.setValue('category', cat.category.toString());
dbu.setValue('subcategory', cat.subcategory.toString());
dbu.execute();
dbu.close();
dbq.close();
},