File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Create statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Create statement" Watch "Create statement" New topic
Author

Create statement

Candy Bortniker
Ranch Hand

Joined: Mar 17, 2003
Posts: 123
I am trying to create a table with several columns. I would like to not put all of the column names on one line because you would have to scroll over to see the full line. Can I do something like:
"CREATE TABLE Reimbursement (GroupAcctNumber VARCHAR(10),
SSN VARCHAR(9), name VARCHAR(20),
date VARCHAR(10), providerSSN(9),
providerName(20) amount float(7),
description VARCHAR(45))"
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15292
    
    6

Are you trying to do this in JAVA Code? This is basically a String concantanation issue. When creating a String in JAVA and spreading it out over multiple lines a + operator must be used. So your statement would be more like:

[ October 18, 2003: Message edited by: Gregg Bolinger ]

GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Create statement
 
Similar Threads
@JoinTable or @JoinCol...
SQL Error
Hypersonic DB question
Create table error
sequence generator with mysql