squirrel-sql : no sequence options - squirrel-sql

I've installed Squirrle and connect to DB2.
Yet in my install I don't get the tree node for "sequences".
I get...
ALIAS
HIERARCHY TABLE
INOPERATIVE VIEW
MATERIALIZED QUERY
NICKNAME
SYSTEM TABLE
TYPED TABLE
TYPED VIEW
VIEW
PROCEDURE
UDT
I'm missing the next one called "SEQUENCE".
I've uninstalled/reinstalled, but I still cant see it.
Anyone have any ideas?

Did you install the optional DB2 plugin ?

Related

MySQL: How to list all tables that are used in a procedure?

I'm looking for a method or a query to retrieve all tables that are used in a procedure.
I tried information_schema.routinesbut it contains all the definition for a procedure.
Is there any system table that contains the dependency relationship for this ?
Or how can I get table names from the definitions using other language such as Python?
Thanks a lot!!
The current version of MySQL does not implement such a view in INFORMATION_SCHEMA.
MySQL 8.0.13 added I_S.VIEW_TABLE_USAGE, which allows you to look up the tables used by a view. This was done for WorkLog #11864. That WorkLog notes compatibility with PostgreSQL and Microsoft SQL Server.
However, there is no WorkLog I can find for an hypothetical I_S.ROUTINE_TABLE_USAGE table. I checked PostgreSQL, and it has this view: https://www.postgresql.org/docs/current/infoschema-routine-table-usage.html but MySQL does not.
So to get this information automatically, you would have to query the procedure body, and parse it for table references. Not an easy task.

Mysql creating table issue

I started learning SQL but just in my first query, failed, i was doing exactly the same as the mentor explaining in the course but somehow his code worked mine not.
I also tried this query on PopSql it also did not work.
What is wrong here?
You need to select the database you are running this query on.
To do this via MySQL Workbench:
Click on the 'Schemas' tab highlighted below:
Then double click on the name of the database you are trying to run the query on, the database name will be bolded once selected.
You need to tell MySQL which database to use:
USE database_name;
before you create a table.
In case the database does not exist, you need to create it as:
CREATE DATABASE database_name;
followed by:
USE database_name;

Unable to query PostgreSQL with Apache Drill 1.11, VALIDATION ERROR

I managed to connect Drill and PostgreSQL but even for a simple command like show tables I am receiving:
org.apache.drill.common.exceptions.UserException: VALIDATION ERROR: Multiple entries with same key: campaign_items=JdbcTable {campaign_items} and campaign_items=JdbcTable {campaign_items}
I have two schemas public and fdw which contains the same table name campaign_items. How can I force Drill to use the fully qualified name to avoid confusion? Any other suggestions?
To use show tables, you need to select the schema first:
First issue the USE command to identify the schema for which you want to view tables or views. For example, the following USE statement tells Drill that you only want information from the dfs.myviews schema:
USE dfs.myviews;
https://drill.apache.org/docs/show-tables/

Print status of database table

I need to print the current status of db table as the db sees it (not what the models think it is).
I'm using Django 1.8. And MySQL.
For example, https://code.djangoproject.com/ticket/23505 shows a status of a table at the bottom. How'd that happen?
In MySQL, you probably want to use DESCRIBE tablename; you can get more information about ways to inspect your database in the official docs.
Note that other databases will use other methods; Django itself is database-agnostic.

Change existing MySQL table inside NetBeans

I created a table inside NetBeans but one column is wrong type, it should be char instead of int. Is it possible to change it or do I have to delete the whole table and start again?
I searched all context menus but can't find "modify"/"edit" option.
my suggestion also you have two options :
1) By using Netbeans, you could edit (change) the current mysql table via Command Execution.
2) By using mysql ADministrator tool, such as MySQL Query Browser from mysql GUI Tool itself
Happy coding!
you can right click on the column name and select "delete option", then right click on the table name and select "add column" option.