New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEFAULT Keyword [CORE665] #1031
Comments
Modified by: Alice F. Bird (firebirds)description: SFID: 1153278# I would like to know I you can consider adding CREATE TABLE MY_TABLE ( INSERT INTO MY_TABLE (TABLE_KEY, or UPDATE MY_TABLE SET Vlad Horsun also said this keyword is in SQL 2002 : "We talk about INSERT\UPDATE syntax with explicit This is feauture F221 according SQL 2002 (which i has) SQL 2002 say: 6.5 <contextually typed value specification> Function Format Both INSERT and UPDATE can specify <contextually => SFID: 1153278# I would like to know I you can consider adding CREATE TABLE MY_TABLE ( INSERT INTO MY_TABLE (TABLE_KEY, or UPDATE MY_TABLE SET Vlad Horsun also said this keyword is in SQL 2002 : "We talk about INSERT\UPDATE syntax with explicit This is feauture F221 according SQL 2002 (which i has) SQL 2002 say: 6.5 <contextually typed value specification> Function Format Both INSERT and UPDATE can specify <contextually |
Modified by: @dyemanovpriority: Major [ 3 ] => Minor [ 4 ] Fix Version: 3.0 [ 10048 ] SF_ID: 1153278 => |
Modified by: @pcisarWorkflow: jira [ 10689 ] => Firebird [ 15071 ] |
Modified by: @dyemanovFix Version: 3.0 Beta 1 [ 10332 ] => |
Commented by: Lukas Eder (lukas.eder) It's been a while since this issue was created ;-) Interestingly, Firebird supports the less useful DEFAULT VALUES clause for INSERT statements as can be seen here: But the DEFAULT keyword for INSERT or UPDATE is really more useful. |
Commented by: @aafemt 1) Should word DEFAULT in UPDATE clause set the field to default value or leave old value intact? |
Modified by: @mrotteveel |
Replaced by #5720 [CORE5449 ] |
Submitted by: Pierre Yager (pierrey)
Duplicates CORE5449
Votes: 4
SFID: 1153278#
Submitted By: pierrey
I would like to know I you can consider adding
a "DEFAULT" keyword to force the engine to set the
default value for a field if this field is present in a query
(insert or update) but user don't want to give it a value :
CREATE TABLE MY_TABLE (
TABLE_KEY INTEGER NOT NULL,
TABLE_VALUE INTEGER NOT NULL DEFAULT 0,
CONSTRAINT MY_TABLE_PK PRIMARY KEY
(TABLE_KEY));
INSERT INTO MY_TABLE (TABLE_KEY,
TABLE_VALUE) VALUES
(GEN_ID(MY_GEN_KEY), DEFAULT);
or
UPDATE MY_TABLE SET
TABLE_VALUE=DEFAULT
WHERE TABLE_KEY=:THE_ID;
Vlad Horsun also said this keyword is in SQL 2002 :
"We talk about INSERT\UPDATE syntax with explicit
defaults.
This is feauture F221 according SQL 2002 (which i has)
SQL 2002 say:
6.5 <contextually typed value specification>
Function
Specify a value whose data type is to be inferred from
its context.
Format
<contextually typed value specification> ::= <implicitly
typed value specification>
| <default specification>
...
<default specification> ::=
DEFAULT
Both INSERT and UPDATE can specify <contextually
typed value specification>"
The text was updated successfully, but these errors were encountered: