Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8804991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:44:58+00:00 2026-06-14T01:44:58+00:00

Execute below script for create test table. create table if not exists t1 (id1

  • 0

Execute below script for create test table.

create table if not exists t1 (id1 int,id2 int);

Now, table is created, and it is empty table.

Execute below script,

select max(id1), max(id2) from t1

It will return below result(one row).

max(id1)      max(id2)
-----------   --------
<null>        <null>

Execute below script,

select max(id1), max(id2) from t1 group by id1,id2

It will return below result(no result).

max(id1)      max(id2)
-----------   --------

Is there somebody explain the reason?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T01:44:59+00:00Added an answer on June 14, 2026 at 1:44 am

    The documentation says:

    The max() aggregate function returns the maximum value of all values in the group. […] Aggregate max() returns NULL if and only if there are no non-NULL values in the group.

    In your first query, there is one group which does not have any records.

    In your second query, there is no group.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

## COMMENT OUT below just for reference cursor.execute ( CREATE TABLE yellowpages ( business_id
Below you could see template of SQL script that i'm trying to execute on
Simple example using oratcl: Create Table and simple package CREATE TABLE test (id INTEGER,val
I have this ant script which should create the table customer. I see the
I created a package and a package body as below: Create or replace Package
I have a NAnt script like below: <target name=Init unless=${target::has-executed('Init')}> What I want is
When I try to execute the below class using ICriteria, if (_userGroupId > 0
I execute the command below to revoke a user's permissions to execute a particular
This is with reference to the below question: Execute program from within a C
When I execute the code saveXML below it generates the error above, why?? using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.