table « mysql « Java Database Q&A





1. How to join another MySQL table when using Master/Detail Sample Form in Netbeans?    stackoverflow.com

I am trying to implement an application by using MySQL/JAVA and I found this tool in netbeans to easily create a new form for an existing table. (edit, insert, delete etc.) Is ...

2. Problem facing while inserting data into dynamically created column of table    stackoverflow.com

I am dynamically adding column to table in db through code using alter table query. But i am facing problem wen i am trying to insert values in that column. it throws ...

3. Fastest way to iterate through large table using JDBC    stackoverflow.com

I'm trying to create a java program to cleanup and merge rows in my table. The table is large, about 500k rows and my current solution is running very slowly. The ...

4. How to create a table in mysql for containing 3 columns?    stackoverflow.com

I want to create a table containing three string columns:

  1. The JSP page
  2. Part of JSP page (like footer, header, text)
  3. Actual value text
How do I do that:
  1. from the command prompt
  2. from a Java ...

5. How do I get a list of tables from MySQL using Java's DatabaseMetaData?    stackoverflow.com

DatabaseMetaData metadata = con.getMetaData();
metadata.getTables(catalog, schemaPattern, tableNamePattern, types);
What fields are required to get a list of tables?

6. Writing desktop app that uses database. Suggestions for how to manage user access to tables?    stackoverflow.com

I'm writing a depsktop application (in Java) that interacts with a database which stores mostly requirements documents,but I have a bit of a dilemma. Specifically, a problem with managing user access. ...

7. Storing data in MySql table through Javamail failed    stackoverflow.com

How can I store the messages which I've written through javamail into MySQL table? I've already configured james server config file to connect to MySQL server(with datasource element name maildb), ...

8. Getting the last inserted record id of a database table in java?    stackoverflow.com

I have a database table A which stores records, A has a primary key (recordid) with auto_increment, each time i insert a record in to A, i get the ...

9. Java - MySQL - Temporary Tables    stackoverflow.com

I periodically receive data that I use to update my database with. The external structure differs from my internal structure so what I end up doing is running the import ...





10. Random numbers in java and creation of tables in mysql    stackoverflow.com

I have the following table

select * from consumer6;

Service_ID | Service_Type | consumer_feedback |

     93           Computing   ...

11. Java Audit table logging, MySQL equivalent of CONTEXT_INFO    stackoverflow.com

I am looking for the MySQL equivalent of CONTEXT_INFO that is present in SQL Server. Or any other session variable like thing using which I can pass the username to the ...

12. Move million records from MEMORY table to MYISAM table    stackoverflow.com

I am looking for a fast way to move records from a MEMORY table to MYISAM table. MEMORY table has around 0.5 million records. Both tables have exactly the same structure ...

13. Is there a way to listen for changes in an MySQL database table using Java and JDBC?    stackoverflow.com

I have a number of users which are logged in at a time in my desktop application. They are working on the same table (create, read, update, delete data) so I ...

14. Way to know table is modified    stackoverflow.com

There are two different processes developed in Java running independently, If any of the process modifyies the table, can i get any intimation? As the table is modified. My objective is ...

15. i got ibfk_5 when trying input forreign key to table    stackoverflow.com

I have structure table like this. alt text the problem is : When i want to input data to "index" table. I got this error.

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or ...

16. Java and MySQL PreparedStatement: storing 5000 numbers in a table. what's the right way?    stackoverflow.com

I'm Writing a facebook application using the Java-facebook-api and MySQL 5.1. I'm trying to find a faster way to store the friends list of a user who logs into my application. When a user ...





17. Full text search with InnoDB tables    stackoverflow.com

I need to use full text search but the tables that I am using in my web application use the INNODB engine, from what I read JDBC does not have support ...

18. Any idea on how to implement these database tables to Java?    stackoverflow.com

I've started to develop my own mini project in restaurant reservation to improve my Java skills. At the moment, I create a table consists of

  • number of tables in the restaurant (column)
  • and ...

19. Easiest way to transform mysql table "as is" into xml document?    stackoverflow.com

Interested how to do it programmatically, not export table data once (there are tools for sure). easiest way to transform mysql table "as is" into xml document ? table contains say 2 rows: ...

20. Using Java to populate a specific column in an SQL table    stackoverflow.com

Essentially, I have a methods that manipulates data taken from a table to create a new object "ZExpert." ZExpert has parameters int id, int domain, and double ZExpert. I have added ...

21. Parsing data into tables    stackoverflow.com

I have created a connection with Mysql and java program via jdbc. Now I want to populate the tables in the mysql database. How do I parse the data into the ...

22. Would you expect MySql to drop records if bombed by inserts on the same table?    stackoverflow.com

I don't have a testing environment for this yet. But before I think too much about solutions I'd like to know if people think this would be a problem. I will have ...

23. Insert the table elements in Collection    stackoverflow.com

HI, I have a collection and i wanna insert all the elements of my table. How i can do this operation in EJB QL? For example: (this isn't my code) I have my Collection:

Collection<Person> ...

24. Class for storing data in java, simulating a mysql table    stackoverflow.com

I want to use a class in Java for storing data which can be accessed for all other classes. Just like if it was a Mysql table. This class should have ...

25. How to transfer mysql table to hive?    stackoverflow.com

I have a large mysql table that I would like to transfer to a Hadoop/Hive table. Are there standard commands or techniques to transfer a simple (but large) table from Mysql ...

26. How to get the last 3 distinct ids from a mysql table    stackoverflow.com

Database Ok so basically I have my database table. The first column is the id. The second is a pkg_id. The 3rd is not important and the ...

27. Connecting Java Object with MySql Tables    stackoverflow.com

I am working with Java Classes, and I'm looking for the easiest way to connect a DB table in MySQL with the members (attributes) to the Java code. After executing the "SELECT" ...

28. Java PreparedStatement and Alter Table syntax error    stackoverflow.com


I have to create an index on a field of a table using PreparedStatement. The query that I've to perform is the following:

ALTER TABLE esa_matrix ADD INDEX doc_index (id_doc) ...

29. Insert table values from a SQL database to an ArrayList    stackoverflow.com

I'm trying to insert some values from my database into an ArrayList. I guess there is some problem with the method showMeeting(). Hopefully you guys can understand some of the message ...

30. Help needed for inserting values to a mysql table    stackoverflow.com

I have created a table using mysql:

CREATE TABLE JobCard (
    ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    JobNo Long,
    RegNo VARCHAR(20),
  ...

31. better way to insert a matrix into a MYSQL table    stackoverflow.com

I have a Java program which will produce a large matrix, at the end I want to save that matrix to a DATABASE 'MYDATABASE' in a myMatrixTable My first thoughts as ...

32. insert Xml file data into MySQL table    stackoverflow.com

I want to insert the Xml file data into MySQL table ,, by choosing which column to insert into ,, using Java How will this be done ?

33. Checking if table exists on MySQL RDMS    stackoverflow.com

I have here java code accessing mySQL database. It checks if table exists. The table is removed and does not exist, though code below is saying that the table exists.

private Boolean ...

34. Making a method to insert data in different tables    stackoverflow.com

I want to make a single method to make inserts on different tables, I want the user to put as parameters the name of the table and a list of the data ...

35. how to insert variable into a table in MySQL    stackoverflow.com

I know how to add data into a table. Like

String insertQuery = "INSERT INTO tablename (x_coord, y_coord)"
               ...

36. MySQL Java JDBC: How to get the name of an auto-incremented column?    stackoverflow.com

I'm working on a program that makes using MySQL databases simpler. Right now I have to create forms to add and edit data from the tables within the database. The problem ...

38. Create separate table for each user to store data or use a single table    stackoverflow.com

I know there are many queries related to this question but my problem is different.I want to make a Password Manager application which stores host name,username,password,notes etc for each user. I can not store ...

39. Java SQL output format table result    stackoverflow.com

I got everythings worked and it print the right result with header(column name) and value. However I wanted to change a plain and unorganized result into a really nice output table ...

40. deleting tables on MySQL from jdbc    stackoverflow.com

Problem when deleting tables from jdbc I have a. jar that deletes records from multiple tables through a previously prepared statement i did it this way:

-- SQL
delete from tabla_a using tabla_a join tabla_c ...

41. library for displaying selectable mysql table in java    stackoverflow.com

Just wondering if there were any libraries out there already written to serv the following purpose:

  • Query database.
  • Display the results in a list/table that has selectable rows.
Basically allowing a user to select ...

42. how to enable multi-thread/connection modify the same mysql table?    stackoverflow.com

I have a program that has 2 threads running, and each thread has its own database JDBC connection, and they will access/modify the same database table A like below. Table A ...

43. How to transfer my MYSQL table to a derby database?    stackoverflow.com

I am trying to use Derby with eclipse, do I have to have the Java EE eclipse? Also is there a way to import a MYSQL table into a derby database? ...

44. Tables are not selectable from a connection using org.gjt.mm.mysql.Driver or com.mysql.jdbc.Driver    forums.netbeans.org

I'm having some problems while accesing to my mysql server from tomcat in a webapp allocated at netbeans. The code below worked in eclipse with no set up at IDE. Code: ...

45. multiple users on the same table in a sql (mysql, postgresql) database    forums.netbeans.org

Hi, I'm currently writing an application meant to be used by multiple users (5+). They will be processing written forms into the system. Since the application will return an unique document number, it is very important that the entries of different users won't get mixed up. Does it give any problems if 2 (or more) users hit the 'OK' button at ...

46. Create Temporary Table in MySQL    coderanch.com

I am working in a JSP. I would like to create a temporary table in MySQL database using a select statement( it is a right join). But I cannot figure out the query statement in Java. Here is the MySQL documentation: CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)] [table_options] [select_statement] My select_statement is "SELECT * FROM Titles RIGHT JOIN Publishers ...

47. mySQL 3.23.51 with BDB or InnoDB Transactional tables NOT rollback!!    coderanch.com

In case anyone's interested, I found the answer. You need to do a few small steps, mainly adding to your my.ini (on windows) or my.cnf (on unix/linux) a few lines. 1. In your my.ini/my.cnf file, find the line "[mysqld]". If the file does not exist, create it (on windows, this goes in the "windir" which is usually c:\WINNT. TO find out ...

48. Create Table in MySQL    coderanch.com

Hi, I have several simple questions regarding creating tables in the MySQL. 1. For a variable of Java primitive int type, I should use INT or INTEGER? Do I have to specify the length of the field? CREATE TABLE message_thread( thread_id INT or INTEGER NOT NULL ); 2. A field in my table is for storing articles. Articles could be very ...

49. Listing tables in mySQL    coderanch.com

50. moving your tables+content to another MySql server    coderanch.com

Say I have created some tables (call it myDB) and it is staffed with some info. I want to send myDB to a different server with mySQL What should I send? I tried sending the: Program Files/MySQL/MYSQL server 4.1/ data/myDB but for some reason not all tables are passed??? does anyone know what is the best way to send your tables+content ...

51. 'export' & 'import' database tables and content in MySql    coderanch.com

Hi all, Simply put, I have created a database (myDB) in MySql and now it has some tables and some info in it. I want to send it to a client of mine (who already have MySql db but not myDB) and he will be able to use those tables and the information. He is not a computer savvy and I ...

52. MySql db: how to backup data only and backup tables only    coderanch.com

Hi Guys, I know this q belongs to the mysql forum but I have always enjoyed to use this one. Here is the deal: I have created a database with a Java application to a client of mine. Sometimes I'm upgrading the software and the database as well (say adding a new tables). The problem: Say I have added a new ...

53. Problem inputing to MySQL table    coderanch.com

54. MySQL - add and remove username from table    coderanch.com

public void addUser(String username, String password, String email) { executeUpdateQuery("" + "INSERT INTO USERS(USERNAME, PASSWORD, EMAIL) " + "VALUES('" + username + "', '" + password + "', '" + email + "')"); } public void removeUser(String username) { executeUpdateQuery("" + "DELETE FROM USERS " + "WHERE USERNAME='" + username + "'"); } private void executeUpdateQuery(String query) { try { statement.executeUpdate(query); ...

55. mysql table does not exist    coderanch.com

56. Problem with table name in mysql    coderanch.com

57. MySQL table joining    coderanch.com

hello, how can i take the combined values of two columns in a table, and insert it to a new column in the same table. All the rows have to be fetched. Only one column always have the value. the corresponding second column, may or may not have the value.if two columns have value, i want to combine those and insert ...

59. error in table creation in mysql    coderanch.com

i m getting an error when i m creating a table in mysql.i m using mysql control center.(0.94 beta).the error is [root@localhost:3306] ERROR 1104: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay plz help me in this regard. biswajit

60. jboss - mysql Table not found in statement    coderanch.com

jdbc/tmpSavingsAcc jdbc:mysql://127.0.0.2:3306/tmp org.gjt.mm.mysql.Driver user temp org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter