Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index



SewHelpMe wrote

Error while saving the table design
Column constraints are not acceptable in statement [ALTER TABLE "Companion
Subspecies" ADD "Help Type" INTEGER NOT NULL]

First of all we should know which type of database you refer to. No, Base is
not a database. It includes a certain type of database product which is
fully documented here: http://www.hsqldb.org/doc/1.8/guide/ch09.html

Assuming that we are talking about HSQLDB 1.8, the COLUMN keyword is
missing. Try this:
ALTER TABLE "Companion Subspecies" ADD COLUMN "Help Type" INTEGER NOT NULL

If your integer "Help Type" is supposed to be a foreign key you may also do
something like this:
ALTER TABLE "Companion Subspecies" ADD CONSTRAINT "FK Help Type" FOREIGN
KEY("Help Type") REFERENCES "Help Types"("ID")

So far all this is possible in the Base GUI.
Select table, menu:Edit>Edit...
Add an integer column and set "Entry required" to "Yes"
In case of a foreign key you can add a relation in the relations manager
adding the involved tables and dragging a line between the foreign key and
the other table's primary key.

This is how you get the full database as SQL script:
Tools>SQL...
SCRIPT '/tmp/database.sql'
where the single quoted string specifies the output file.
You can also close the database, open it in a zip tool and get the embedded
file ./database/script


--
View this message in context: 
http://nabble.documentfoundation.org/Integer-Not-Null-tp3990551p3990582.html
Sent from the Users mailing list archive at Nabble.com.

-- 
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.