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

  • SEARCH
  • Home
  • 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 8932117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:16:10+00:00 2026-06-15T09:16:10+00:00

Any one help me to create a trigger for auto increment fld_id and Unix

  • 0

Any one help me to create a trigger for auto increment fld_id and Unix datetime. My table field is fld_id(int),fld_date(number),fld_value(varchar2).

My insert query is

insert into table (fld_value)values('xxx');
insert into table (fld_value)values('yyy');

I need the table record like this

fld_id    fld_date     fld_value
1         1354357476    xxx
2         1354357478    yyy

Please help me to create this.I can’t able to do this..

  • 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-15T09:16:11+00:00Added an answer on June 15, 2026 at 9:16 am

    If you want fld_id to be a sequential value, you’ll need to create a sequence and a trigger

    CREATE SEQUENCE sequence_name
      START WITH 1
      INCREMENT BY 1
      CACHE 20;
    
    CREATE OR REPLACE TRIGGER trigger_name
      BEFORE INSERT ON table_name
      FOR EACH ROW
    BEGIN
      SELECT sequence_name.nextval
        INTO :new.fld_id
        FROM dual;
      :new.fld_date := (SYSDATE - date '1970-01-01') * 60 * 60 * 24;
    END;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

pls any one help me i have create the edges in my project.i know
Any one help to to get the extact value from the JavaScript date time
Can any one help in transforming my xml though XSLT. I am new to
Can any one help me, i already checked resizing demo but this work through
can any one help me with code that subtract 1 from a digit stored
can any one help me in creating a regular expression for password validation. The
Can any one help me how to sort rows by relevance for the following
Can Any one help me reading this XML and Looping through <MedicationDispensed> I get
Wondering if any one can help me out here. I have a single page
I hav a table with several fields. One field is date_assigned and the other

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.