h2database / h2database/h2database

Is there a way to write an alias function for Informix "SELECT FIRST"

Open
#2,580 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.6k
Forks
1.3k
Avg merge
1d 2h
Merged PRs (30d)
9

Description

An informix limit query looks like:

SELECT FIRST 10 * FROM table ORDER BY date;

which is the same query as SELECT * FROM table ORDER BY date LIMIT 10;

I am wondering if there's a way to write a function using "CREATE ALIAS" with H2? Or some other way so it can be parsed by H2 to act like the equivalent?

Thank you

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking H2's SQL parser or grammar for the CREATE ALIAS and SELECT FIRST syntax mentioned in the issue, then compare it with existing LIMIT handling. Done means determining whether the Informix form can be supported or documenting the supported alternative.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.