Sign Up

Sign Up to our social questions and Answers 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 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

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Sorry, you do not have permission to add post.

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.

Oraask Logo Oraask Logo
Sign InSign Up

Oraask

  • Write
    • Add A New Post
    • Ask A Question

Oraask Navigation

Search
Ask A Question

Mobile menu

Close
  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
  • Wiki
    • SQL Tutorials
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials

Himanshu kumar

JuniorTA @GEEKSFORGEEKS | CONTENT CREATOR | FREELANCE CONTENT WRITER |
Ask Himanshu kumar
64 Visits
0 Followers
1 Question
Home/ Himanshu kumar/Answers
  • About
  • Questions
  • Answers
  • Best Answers
  • Posts
  • Polls
  • Asked Questions
  • Followed
  • Favorites
  • Comments
  • Followers Questions
  • Followers Answers
  • Followers Posts
  • Followers Comments
  1. Asked: July 19, 2022In: Oracle SQL

    What is the use of LIMIT and OFFSET in SQL

    Himanshu kumar
    Himanshu kumar Junior TA @GEEKSFORGEEKS | CONTENT CREATOR | FREELANCE CONTENT WRITER |
    Added an answer on July 23, 2022 at 1:42 am

    We will be using below Students table to explain the Example Queries:- If there are a large number of tuples satisfying the query conditions, it might beresourceful to view only a handful of them at a time. The LIMIT clause is used to set an upper limit on the number of tuplesreturned by SQL. It isRead more

    We will be using below Students table to explain the

    Example Queries:-

    If there are a large number of tuples satisfying the query conditions, it might be
    resourceful to view only a handful of them at a time.

    • The LIMIT clause is used to set an upper limit on the number of tuples
      returned by SQL.
    • It is important to note that this clause is not supported by all SQL versions.
    • The LIMIT clause can also be specfied using the SQL 2008 OFFSET/FETCH
      FIRST clauses.
    • The limit/offset expressions must be a non-negative integer.

    Example Queries to demonstrate LIMIT Clause.

    • SELECT *
      FROM Students
      LIMIT 3;

    Output of the query gives First three Student Records.

    • SELECT *
      FROM Students
      ORDER BY age
      LIMIT 3;

    Output of the query gives three Student Records in order of Ascending Ages.

    The LIMIT operator can be used in situations such as the above, where we need to
    find the top N students in a class and based on any condition statements.

    Using LIMIT along with OFFSET

    LIMIT x OFFSET y simply means skip the first y entries and then return the next x
    entries.
    OFFSET can only be used with the ORDER BY clause. It cannot be used on its own.
    OFFSET value must be greater than or equal to zero. It cannot be negative, else
    returns error.
    Example query to demonstrate LIMIT and OFFSET.

    • SELECT *
      FROM Students
      LIMIT 3 OFFSET 2
      ORDER BY roll_no;

    Returns 3 Student Records skipping first two records in Table.

     

     

     

     

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  2. Asked: July 19, 2022In: Oracle SQL

    What are the differences between SQL and PL/SQL in Oracle

    Himanshu kumar
    Himanshu kumar Junior TA @GEEKSFORGEEKS | CONTENT CREATOR | FREELANCE CONTENT WRITER |
    Added an answer on July 23, 2022 at 1:32 am

    SQL- SQL, is Structural Query Language for database. SQL has no variables. SQL is data oriented languages. SQL is very declarative in nature. SQL is used in manipulating data. SQL tells data what to do ? PLSQL- PL/SQL is a programming language using SQL for a database. PL/SQL has variables, data typRead more

    SQL-

    1. SQL, is Structural Query Language for database.
    2. SQL has no variables.
    3. SQL is data oriented languages.
    4. SQL is very declarative in nature.
    5. SQL is used in manipulating data.
    6. SQL tells data what to do ?

    PLSQL-

    1. PL/SQL is a programming language using SQL for a database.
    2. PL/SQL has variables, data types etc.
    3. PL/SQL has a procedural nature.
    4. PL/SQL used for creating application.
    5. we can execute block of statements in PL/SQL.
    6. PL/SQL tells databases how to do.
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  3. Asked: July 20, 2022In: Oracle SQL

    What is the use of ADD, DROP and MODIFY Commands

    Himanshu kumar
    Himanshu kumar Junior TA @GEEKSFORGEEKS | CONTENT CREATOR | FREELANCE CONTENT WRITER |
    Added an answer on July 23, 2022 at 1:22 am

    ALTER TABLE is used to add, delete/drop or modify columns in the existing table. It is alsoused to add and drop various constraints on the existing table. ALTER TABLE - ADD ADD is used to add columns into the existing table. Sometimes we may require to addadditional information, in that case we do nRead more

    ALTER TABLE is used to add, delete/drop or modify columns in the existing table. It is also
    used to add and drop various constraints on the existing table.

    ALTER TABLE – ADD

    ADD is used to add columns into the existing table. Sometimes we may require to add
    additional information, in that case we do not require to create the whole database
    again, ADD comes to our rescue.

    Syntax:

    • ALTER TABLE table_name
      ADD (Columnname_1 datatype,
      Columnname_2 datatype,
      Columnname_n datatype);

    ALTER TABLE – DROP

    DROP COLUMN is used to drop column in a table. Deleting the unwanted columns from
    the table.

    Syntax:

    • ALTER TABLE table_name
      DROP COLUMN column_name;

    ALTER TABLE-MODIFY

    It is used to modify the existing columns in a table. Multiple columns can also be modified
    at once.
    Syntax may vary slightly in different databases. Syntax(Oracle,MySQL,MariaDB):

    • ALTER TABLE table_name
      MODIFY column_name column_type;

     

    Syntax(SQL Server):

    • ALTER TABLE table_name
      ALTER COLUMN column_name column_type;

    Queries
    Sample Table:

    Student

    • ROLL_NONAME
      1 Ram
      2 Abhi
      3 Rahul
      4 Tanu

     

    QUERY:•

    To ADD 2 columns AGE and COURSE to table Student

    • ALTER TABLE Student ADD (AGE number(3),COURSE varchar(40));

     

    OUTPUT:

    • ROLL_NONAMEAGECOURSE
      1 Ram
      2 Abhi
      3 Rahul
      4 Tanu

     

    • MODIFY column COURSE in table Student

     

    • ALTER TABLE Student MODIFY COURSE varchar(20);

     

    After running the above query maximum size of Course Column is reduced to 20
    from 40.

    • DROP column COURSE in table Student.

     

    ALTER TABLE Student DROP COLUMN COURSE;

    • OUTPUT:
      ROLL_NONAMEAGE
      1 Ram
      2 Abhi
      3 Rahul
      4 Tanu
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  4. Asked: June 30, 2022In: Java

    How can we set java path in windows 10

    Himanshu kumar
    Himanshu kumar Junior TA @GEEKSFORGEEKS | CONTENT CREATOR | FREELANCE CONTENT WRITER |
    Added an answer on July 17, 2022 at 12:05 am

    Following are the steps for setting the java path in window 10 :- 1- Go to the Search box and type advanced system settings in it. Now click on the View advanced system settings. 2- Select the Advanced tab and then click environment variables. 3- In the system, variables click the New button. Now inRead more

    Following are the steps for setting the java path in window 10 :-

    1- Go to the Search box and type advanced system settings in it. Now click on the View advanced system settings.

    2- Select the Advanced tab and then click environment variables.

    3- In the system, variables click the New button. Now in the edit system variable, type variable name as JAVA_PATH and variable path as the path where the JDK folder is saved and click on OK button Usually the path of the JDK file will be C:\Program Files\Java\jdk1.8.0_60.

    4- Now in the system variables go to the path and click the edit button.

    5- Click the New button.

    6- Now add the following path: %JAVA_HOME%\bin

    I hope this helps.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp

Sidebar

Adv 250x250

Explore

  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
  • Wiki
    • SQL Tutorials
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials

Footer

Oraask

About

Oraask is a website for developers and software engineers who want to learn new skills, share their knowledge, and solve their coding problems. Oraask provides free content on various programming languages and topics, such as Oracle, Python, Java, etc. Oraask also allows users to ask questions and get answers from other members of the community.

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy
  • Terms & Conditions

Follow

Oraask is licensed under CC BY-NC-SA 4.0Oraask CopyrightOraask CopyrightOraask CopyrightOraask Copyright

© 2019 Oraask. All Rights Reserved
With Love by Oraask.