Skip to main content

Questions tagged [table]

A data structure that organizes information into rows and columns.

Filter by
Sorted by
Tagged with
0 votes
0 answers
33 views

How to add values matching from table B to table A?

I've been struggling for a while now. Can someone help me? I have 2 tables. I have a table 'SKUS_info' with SKUS(a number assigned to a product), approximately about 30k rows. And the second table ...
Sigitas's user avatar
0 votes
0 answers
221 views

Does having unused columns effect the indexing of the table

I have a table where there are some columns which are empty and they are not used. That table has to be indexed multiple times based on the application. Does having these empty columns in my table ...
Aditya Y's user avatar
  • 101
0 votes
1 answer
34 views

How to store data in look-up tables when some of it may be semantically different, but logically the same?

I am working on a system that receives communications from various laboratories. Each laboratory has two separate, independently operated data services which means that Laboratory A and Laboratory B ...
Zachary Weber's user avatar
0 votes
1 answer
58 views

Combine many table into one table in mysql table design

I'm grappling to design table relation. Version is Mysql 5.6.10. My case is like below bill table, payment table, contract table, recruitment tables... are existing. Currently we're considering new ...
jonggu's user avatar
  • 144
1 vote
1 answer
54 views

MySQL, operation DELETE

I have: DELETE FROM songs WHERE songs.id_album = album.id AND album.id_band =16` Error: #1054 - Unbekanntes Tabellenfeld 'album.id' in where clause. Table album exists, field id too, 100%. ...
Vlachucha's user avatar
0 votes
0 answers
70 views

Can you insert a value from a range in mysql?

So basically I have one auto incrementing column which is increments every time a ticket has been sold. However I also have 50 chairs inside the room. since I can't use auto_increment 2 times is there ...
Yvalson Dronkers's user avatar
1 vote
1 answer
84 views

How to count records from different tables [closed]

So I'm trying to filter some records out of my select inside a form on my website. Problem is that I currently have this setup: Database Table1 time Number Table2 Number Something I'...
Yvalson Dronkers's user avatar
0 votes
1 answer
262 views

Generate metadata file from PostgreSQL server [closed]

Is there a way that I can make a metadata-sheet that lists all the available tables from a postgresql-database, so users can see documentation of the tables? I know that there are descriptions, ...
Michael's user avatar
  • 139
0 votes
1 answer
58 views

Left join SQL Select Statement

Good day, Im trying to find a good way on my select statement Table1 AccountID AccountName Rate OldRate 01 Smith X X2 02 Providence X X2 03 ...
Jesun Bicar's user avatar
0 votes
2 answers
2k views

How to create a table in a database on a different server

I need to create Table B in database B on SQL Server B by querying Table A in database A on SQL Server A. Table B does not exist in database B. SQL Server A and B are linked. I wonder how could this ...
Nico M.'s user avatar
  • 67
1 vote
2 answers
112 views

Combing two queries in one

I have two tables, e.g. "Locations" and "Connections" "Locations" has values Id | Dimension --------------- 1 | 4 2 | 8 3 | 2 "Connections" maintains attributes Origin | ...
Taras's user avatar
  • 177
0 votes
1 answer
3k views

How to create multiple tables based on existing tables in postgreSQL?

I have several tables, and I need to create a matching _hist table for each one. For example if I have: CREATE TABLE public.test ( first text, middle text, "last" text, ...
Granny Aching's user avatar
0 votes
1 answer
295 views

schema of messaging system

in a web application where people talk to each other , there will be a lot of messages , suppose for simplicity that each row in a table is a message , do you think if a have 5 million messages that ...
Ana Ana's user avatar
0 votes
1 answer
608 views

Questions on database table and index partitioning in SQL Server

I have developed Transact-SQL script to partition the table. To apply the partition, I am creating one non-clustered index for my partition key column and associating it to partition scheme. I have ...
Murali Dhar Darshan's user avatar
2 votes
3 answers
3k views

Should I create new table for each User to store their product List?

I'm creating a Web based billing and inventory management system. I need to store the product details such as name, price, stock left and also want to store details of every bill for each user ...
Shibi Chakkaravarthy's user avatar
0 votes
1 answer
640 views

External Table: VARCHAR in Create but CHAR in Access Parameters

Consider this SO Question UTF-8 And External Tables. A proposed solution contains VARCHAR2 columns in the CREATE section but those same columns get CHAR attributes in the ACCESS PARAMETERS section. ...
zundarz's user avatar
  • 103
0 votes
2 answers
747 views

Will frequent creation and deletion of TABLE (not indexes) cause fragmentation in database?

Does frequent creation and deletion of physical table in database causes fragmentation? I am frequently creating and deleting database for loading data warehouse load. I am using these table to hold ...
Ravikumar V's user avatar
1 vote
1 answer
37 views

SQL How to show information from others tables in select requet

There are my database user id | user_code | user_name 1 | 1x2d | Peter shops id | shop_code | shops_name 1 | 1234 | shop1 2 | 3456 | shop2 articles id | art_code | art_name 1 | ...
Stolker's user avatar
  • 33
1 vote
0 answers
28 views

Best practise for data dump 'entry point' in DB processing chain - PostgreSQL

I need to implement a process chain to transform and analyze potentially large sets of data, inserted both programmatically and manually (e.g. CSVs). In either way, the input data is standardized in ...
t.ry's user avatar
  • 21
1 vote
2 answers
1k views

database design for song position under play-list

I have a music streaming application where I have playlists. Each playlist has maximum 100 songs. I have a mapping table called PlaylistSongMapping which has the following schema +------+------------+...
M14's user avatar
  • 111
2 votes
0 answers
66 views

Statistics injection for calculating the cost of a query

I want to find out the cost of a query by "EXPLAIN" query in Postgres. As I know, Postgres calculate this cost by using the statistics of the table. (e.g: relpages, reltuples in pg_class or some ...
Le Duong's user avatar
0 votes
0 answers
18 views

Creating a database for due dates

In my current role I have to write down all my projects on pre-made grid on a dry erase board. As I finish a project I erase it but as the board reaches its capacity I have to manually shift ...
Jaf's user avatar
  • 1
0 votes
2 answers
2k views

Get Headers from SQL Table

I am looking for a way to dynamically get the headers from a table without having to write them (select 'header1' as "header1"...., 'header50' as "header50" from MyTable) It doesn't work above a ...
Amandine FAURILLOU's user avatar
0 votes
1 answer
57 views

SQL, creating a new table with auto generated passords from other tables

i have this sql below which i have retrieved from our student database. It retreives all that i need, but i would like to create a new table which includes all the tables plus one column with auto ...
Vitor Fernandes-Neto's user avatar
1 vote
0 answers
837 views

What are the advantages of using a Materialized View directly on a table?

Recently, in enterprise's Oracle database, I have seen some materialized views that filter directly columns of table without adding aggregate fields and without calling custom functions. Example: ...
schlebe's user avatar
  • 191
1 vote
1 answer
71 views

Pivot information - sql table

I was wondering if anyone could help me with pivoting data in sql? I am a newbies and need some help I want to pivot data based on "LastLogOn" column. Is it possible to do in SQL? From: To:
Bob's user avatar
  • 11
0 votes
1 answer
480 views

How to LOCK/BLOCK selected row in table to be ReadOnly?

Is it possible to LOCK completely or make READ-ONLY where id = value in MariaDB? or add some trigger locking if someone is trying to update selected row ? Some people says: "Trigger is not a good way ...
Rob D. A.'s user avatar
  • 103
-2 votes
1 answer
54 views

Copy column rows to be the first rows in column

I have two database tables named vegan_ar_sheet1 (old) and vegan_en_sheet1 (new). Now I want to copy the column name and all of its contents from the vegan_ar_sheet1 table to the vegan_en_sheet1 ...
LiNuX's user avatar
  • 1
-1 votes
1 answer
366 views

Is mysql using some kind of auto repair due to "check table" warnings?

Today i noticed a "strange" behaviour of MySQL when using "CHECK TABLE" on a crashed table. First i got a warning like "Size of datafile is: * ... Should be: *" but i could still "insert into / select ...
thx4help's user avatar
0 votes
1 answer
126 views

In which context does a procedure run when called from another context?

Envisage: use databaseA; go exec databaseB.dbo.spProcedure(); go Does the procedure execute against databaseA - the context from which it is called, or databaseB - the context in which it exists? ...
youcantryreachingme's user avatar
0 votes
1 answer
381 views

Update two tables, each on separate MySQL servers, on two different machines in one query?

I have two MySQL servers running on two different machines in a local network. I am using PHP and accessing the databases via IP. No problems there. The databases have identical schemas. One of them ...
drforbin's user avatar
0 votes
2 answers
190 views

DB2 huge IREF and lots of scans

I received a task from one of my colleagues to check why he always receives high CPU load alerts. I don't have too much experience with databases and I need some clarifications. I created a script to ...
alex suru's user avatar
-1 votes
2 answers
137 views

How to display null records/rows from table

For ex: I have a record with name = "sga_target", and no record exists where name = "_exafusion_enabled". I still want to display a row with "_exafusion_enabled" as name and NULL as value, without ...
satya's user avatar
  • 11
3 votes
4 answers
2k views

Representing lists in SQL

My database setup is modern (My)SQL. I've got a Content Table, including ids. Now, users should be able to comment on content. To achieve this, arrays have come to my mind. Now I see several options ...
Luatic's user avatar
  • 143
1 vote
2 answers
1k views

Trigger with a Variable Select and Order by

Is there a way to a set trigger that will activate once a new table is created and will get the new tables name? I was able to come up with the query below but it only gets the first query by ...
Roxzurafa's user avatar
2 votes
2 answers
4k views

Does SQL Server automatically update the foreign key relationships between tables when one of those tables is renamed?

What happens to the foreign key relationships on a table if that table is renamed?
J.D.'s user avatar
  • 38.1k
2 votes
0 answers
184 views

IDB file Maximum kb limit

I'm new in handling MySQL database, I made a tracking system I using the MySQL database incorporated on the xampp package as a database. Everything is running smoothly, however upon reaching 90,112 kb ...
Yani's user avatar
  • 21
3 votes
2 answers
53 views

How can I instantly update a table in a database with the columns values from another database?

I have database_1 and database_2 both on the same server. How can I instantly update the USER table in database_2 when data is inserted into the USER table in database_1? Structure of both tables: ...
John's user avatar
  • 33
0 votes
3 answers
959 views

InnoDB "holes" in large table 200 Million Rows?

I have a large MySql InnoDB table with about 200 million rows. One of the columns has some data in it that I really don't need any more, so I'm thinking about removing that column, or setting all the ...
Steve B's user avatar
0 votes
2 answers
2k views

MySQL 5.1 - long running select locking the table and not allowing inserts

Platform - MySQL 5.1, MyISAM engine We reached max on int (id, auto increment) in our Prod system. Changed the type to BigInt. Even since this change was made, long running selects are locking the ...
MySQL Q's user avatar
5 votes
1 answer
4k views

One generic mapping table VS many specific mapping tables

I'm trying to design database tables to track files uploaded by end users. Files can be uploaded under different contexts. Each context is a different table. As an example: An employee can upload ...
Jason's user avatar
  • 51
1 vote
0 answers
895 views

Postgres pg_dump copy table to another database isn't copying columns

Goal: copy a single table including all columns from one database to another using psql on the command line, avoiding an issue with XML from QGIS layer styles. I am running the following on the ...
Chris Meder's user avatar
0 votes
1 answer
3k views

Upload multiple csv file to multiple tables sqlServer

I have over than 200 csv files that each of them is diffrent table. I create now a new DB and want to upload them all so I will have all the table. I not accessable to old DB to backup in diffrent ...
Jonert6544's user avatar
1 vote
3 answers
2k views

What can be best database schema for multiple project and one database? [closed]

I am working on multiple projects but the back-end will remain the same. I have a different server for auth, data, etc. and one database to store all the details. If one projects are creating any ...
Vidhya's user avatar
  • 119
0 votes
0 answers
51 views

How think about column value decide to refer table in mysql

I'm designing table relationship. I have an one question. An Example) Some customer want to contract car or bike. Customer must contract an one only. I'm thinking for this case table relationship....
jonggu's user avatar
  • 144
5 votes
1 answer
2k views

Same table alias for two different tables (Oracle)

This example has the same table alias used for two different tables. I don't understand why this is allowed by Oracle, and if allowed, how the results make any sense. create table Table_A (x number);...
Tom Warfield's user avatar
1 vote
1 answer
292 views

How create a table inside the selected database in PostgreSQL?

This is the command to create a new database, CREATE DATABASE mydb; This is the command to create a new table, CREATE TABLE IF NOT EXISTS mytable ( int a PRIMARY KEY ); But this does not add the ...
Codename K's user avatar
-1 votes
1 answer
9k views

How do I CREATE a table only if it doesn't exist in PostgreSQL?

This is the way to create a new table in PostgreSQL, CREATE TABLE foo ( foo_id int PRIMARY KEY, bar text, ); How do I do this if it needs to check if the table already exists and to ...
Codename K's user avatar
0 votes
1 answer
26 views

MS Access Query summarizing 2 tables doesn't produce expected output

I cannot successfully create a query in MS Access 2016 that correctly summarizes data from 2 tables with similar but not completely identical fields. I have a fruit market. I buy each type of fruit ...
jmcafee's user avatar
  • 13
4 votes
1 answer
8k views

Check if table exists on a linked server

I've had a search, but can't find a post relating to this instance specifically. We have a linked production database that I'm trying to reference from our 'sandbox' server. I want to check if a ...
Jon's user avatar
  • 143

1
3 4
5
6 7
11