Questions tagged [database-table]

In a relational database management system (RDBMS) a table organizes the information in rows and columns. Each table has a defined number of columns, each of which is identified by its name, but the number of rows is variable, consisting of one for each line of data.

In a relational database management system (RDBMS) a table organizes the information in rows and columns. Each table has a defined number of columns, each of which is identified by its name, but the number of rows is variable, consisting of one for each line of data.

More Information:

  1. The wiki entry on database tables is a good source of information.
  2. Microsoft provides an intuitive definition of a table
313 questions
8
votes
3 answers

Query to find the difference between successive rows in Mysql

As I am new to MySQL, this question may be silly. How can I find the difference between successive rows? Example: A table (tableName='Abc') contains a single row as follows, |DATA| |10 | |20 | |30 | |40 | |50 | Here I want get the output…
Deepak Mani
  • 1,099
  • 2
  • 15
  • 20
8
votes
3 answers

Creating database table

I am creating a database table for investigations and i need to log the person who reported the incident, this could be a record from the supplier or user tables. The easiest way to do this would be to have both a suppleir and a user id column in my…
slex
  • 855
  • 2
  • 10
  • 20
7
votes
5 answers

How do you determine the base table?

My question is in relation to database theory. If I am given a set of tables, is there a way to determine the base table just by looking at them?
user559142
  • 12,279
  • 49
  • 116
  • 179
7
votes
2 answers

Creating Multiple tables in SQLite on Android

Hi there i want to create two distinct tables in a database. These tables are User_details and Creditcard_details I have created the following DBAdapter class to implement the database operations, however when i call the insertCreditcard() method…
arun
  • 1,001
  • 2
  • 8
  • 5
6
votes
1 answer

Android SQLite copy table to another table

I want to implement delete column in Android's SQLite. I want to make table copy without desired column, than delete former tablet and set name at new_one as a former name. I have made table to table copy, but now I have it as a 1:1 copy. How to…
Waypoint
  • 17,283
  • 39
  • 116
  • 170
6
votes
2 answers

Duplicate a Row Based on a Condition SQL

I have a table that looks like this +-------+------+------+----------+ | Index | F1 | F2 | Multiply | +-------+------+------+----------+ | 0 | LG | SC | 1 | | 1 | WE | CC | 1 | | 2 | TY | PL | 2 …
user3277335
  • 1,947
  • 2
  • 15
  • 16
6
votes
2 answers

SQL Server - Table Metadata

I have a 1000 tables in the SQL Server Database. If I wanted to add a brief description of what each table does in my application, should I be creating another table to maintain that information? Or is there a better way to this? For example ; If…
5
votes
4 answers

MySQL Error 1 (HY000) Trouble creating file Errcode 2

I'm having issues creating a table for my ruby on rails app. It's driving me crazy! The following is returned when I try to create the table: ERROR 1 (HY000): Can't create/write to file '/usr/local/mysql/data/test_development/users.MYI' (Errcode:…
Ashley
5
votes
4 answers

Creating a SQL table from a xls (Excel) file

I'm trying to convert an Excel document into a table in SQL 2005. I found the link below and am wondering if it looks like a solution. If so, what would the @excel_full_file_name syntax be and where would the path be relative to?…
madcolor
  • 8,105
  • 11
  • 51
  • 74
5
votes
3 answers

Is there a shortcut to normalizing a table where the columns=rows?

Suppose you had the mySQL table describing if you can mix two substances Product A B C --------------------- A y n y B n y y C y y y The first step would be to transform it like P1 P2 …
4
votes
4 answers

What should be table structure to maintain login logout logs?

I have loginlog table as following Field Type login_id int(10) NOT NULL platform varchar(50) NOT NULL browser varchar(50) NOT NULL ipaddress varchar(50) NOT NULL last_login datetime NULL last_logout datetime NULL But on…
Rajan Rawal
  • 6,171
  • 6
  • 40
  • 62
4
votes
2 answers

Database design for a quiz app

I am little stuck with the database design for my quiz app. Kindly guide me on this - My app UI will go something like this - My DB Tables - User - user_id user_name user_email user_password user_registration_date user_active Question…
Trialcoder
  • 5,816
  • 9
  • 44
  • 66
3
votes
1 answer

How to amend my script to add row call back function in database tables

I would appreciate any help in ammending my script to add row call back function in database tables. Using datatables I want to show the row number. I have found the code provided by @Pehmolelu in answer to a similar question but as this is my very…
user14762984
3
votes
1 answer

MySQL ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes

I have a MySQL table and I have the need of increasing the capacity of two columns. One column resized fine with this command: ALTER TABLE TABLE_NAME MODIFY COLUMN COLUMN_NAME varchar(7000); The other column returned the error message: ERROR…
spiderwebdev
  • 75
  • 1
  • 8
3
votes
1 answer

Qt4: Print a SQL table to PDF

Qt has built-in PDF export support (QPrinter::PdfFormat). What's the best way to print an SQL table to a PDF file? (a table from a database loaded with QSqlDatabase and linked to a QTableView)...
yolo
  • 2,757
  • 6
  • 36
  • 65