Creating Views in MYSQL via Sysdate

5 pts.
Tags:
MySQL
MySQL Database
Oracle
Hello Guys, I can create simple views for MYSQL Database tables but I am unsure on how to create a view for the following requirement:
  • I want to create a view which restricts staff user access to a specific table between working hours of 13:00 - 14:00.
I have been told that this can be implemented via the sysdate function. Any ideas on how I would do this? All help is well appreciated! Thank You!

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Subhendu Sen
    U may use vpd policy to overcome this issue / grant users access to a view.... try this small lines of codes ! create view <viewname> as select * from <tablename> where (to_char(sysdate,'HH24MI') between '1300' and '1400' or user = '<username>' ); Be cautious about syntax / single quote etc.... Plz see here an idea on the same from MYSQL
    29,710 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following