Skip to content

Tag: database

Select a specific index row in sqlite

I have an index and I need to find out what is the row in a table with that index, in SQLite. Example: Index = 1 Table: Which is the correct SELECT that I can use to solve my problem? Answer Typically to get a specific row you can always request them by rowid, e.g. However, there are some atypical

Grant privileges on future tables in PostgreSQL?

I am running PostgreSQL 9.3.1. I have test database and backup user which is used to backup the database. I have no problems with granting privileges to all current tables, but I have to grant privileges each time the new table is added to schema. Is it possible to grant access to tables which will be created…

JPA with HIBERNATE insert very slow

I am trying to insert some data to SQL Server 2008 R2 by using JAP and HIBERNATE. Everything “works” except for that it’s very slow. To insert 20000 rows, it takes about 45 seconds, while a C# script takes about less than 1 second. Any veteran in this domain can offer some helps? I would app…

SQL max product price [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself. Closed 8 years …

MySQL : ERROR 1215 (HY000): Cannot add foreign key constraint

I have read Database system concepts, 6th edition, Silberschatz. I’m going to implement the university database system shown in chapter 2 on OS X on MySQL. But I have a trouble with creating the table course. the table department looks like Creating the table course causes the following error. after sea…