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
1
vote
1 answer

calling stored procedure inserts NULLs into all columns MySQL

I've created a stored procedure in MySQL to help debug something, however when i call the stored procedure it inserts NULL values into my table for all columns Table CREATE TABLE `EncryptionDebug` ( `ObservedValue` mediumtext COLLATE…
phemor
  • 299
  • 6
  • 17
1
vote
1 answer

SQL Server : How to display all extended event tables

When I run my query SELECT * FROM sys.sysobjects WHERE xtype = 'U' I find there are 2 more tables added trace_xe_action_map and trace_xe_event_map, I realize then that these two siblings come from extended events but I remember inserting them into…
user1453256
  • 49
  • 1
  • 3
1
vote
1 answer

Separate tables for just one field can be logical?

If I have one table which has a City field and as expected this field will repeat itself so only separate it to another table can be ok for normalizing concepts? I mean separated table who has only one field can be meaningful and can help…
Freshblood
  • 6,285
  • 10
  • 59
  • 96
1
vote
2 answers

How to copy few records from a table on one server to the table with same structure on another server in PHP and MySQL?

I've two same MySQL databases present at two different servers. Initially both the databases have the exactly same structure and contained the same data. But later on few new records(new users) got added to both the tables. This created the…
user4661379
1
vote
2 answers

insert data to SQLite with button_click in C#

I want to insert data to SQLite with my WPF project, and I hope after I click a button, I could save a data into the SQLite, here's my code. private void AddToDB_Click(object sender, RoutedEventArgs e) { sqlite_Conn = new…
Alanight
  • 353
  • 2
  • 8
  • 23
1
vote
2 answers

SQLite add a list to a table

I am writing a Xamarin Android application using SQLite and am not sure how to add an object to a table where the object has a list. Here is my model class: public class TestObject { [PrimaryKey] public int Id { get; set; } public string…
Simon
  • 7,991
  • 21
  • 83
  • 163
1
vote
2 answers

More efficient to query a table or a view?

I am still trying to wrap my head around exactly how views work and when it is best to use a view vs querying a table directly. Here is my scenario: All of the underlying data resides in a single table that stores three month's worth of data The…
user2774187
  • 21
  • 1
  • 5
1
vote
1 answer

Too many tables in Sybase, how too cope

I have Sybase version 10.0.1.3960 and 'inherited' very large database. I am trying to grant SELECT privileges on all tables to a single user. The problem is there are a lot of tables, 681 tables to be exact! Too many tables to write the query…
recursion.ninja
  • 5,377
  • 7
  • 46
  • 78
1
vote
1 answer

sql statement for wordpress query

im trying to extract the following fields from a local wordpress installation post_title image_url post_excerpt other criteria for the SELECT is: the status is publish it's a post item and the results only come from the projects parent category…
1
vote
1 answer

How can a set of validation rules be applied for all forms that save to a specific table?

I have multiple forms that write to the same table. I want all data written to that table to be validated with the same rules. I can not find a way to apply the validation at the table level. It looks like it will have be done on a per-form basis…
1
vote
2 answers

How to Disable/Deny Access to SQL tables while they are updating

I have an SSIS Package that truncate and load tables every day, I need to make sure that no one can access those tables while they are being updated... because he might get partial data. What is the best method to do that?
Rick Coleman
  • 454
  • 4
  • 8
1
vote
1 answer

MySql convert select query to update

I have been struggling with a MySQL update query for some time, but cannot figure out the solution. I have Table_Items: - id - desc - maintenance_times and Table_Maintenances: - id - Item_id - maintenance_desc They are related to each other like…
1
vote
4 answers

MySQL add timestamp when saving data

I have this php script to save data to a database hourly, and I was wondering how to add a timestamp when the data is saved. (also, what should I put as Length/Values in phpMyAdmin) The columns in my table are: Number, Name, Type, Null, Default …
Smeagol
  • 31
  • 1
  • 10
1
vote
0 answers

MySQL - create table error 3 [HY000]

Slowly but surely I am getting the hang of the command line methods rather than using the GUI, but I seem to be failing at creating tables in my database. I'm getting the following error code: ERROR 3 (HY000): Error writing file…
Morphey
  • 65
  • 2
  • 6
1
vote
3 answers

How can I get the count of multiple columns in SQL

Say I had two tables in SQL. Now I would like to get the quotient of the count of table 1 and count of table 2. How can I do that? In Short: (# of rows in table 1) / (# of rows in table 2) EDIT: This is what I tried: SELECT COUNT(t1.a) /…
user2426316
  • 7,131
  • 20
  • 52
  • 83