Question

Restricting Rows And Sorting Data Discuss the differences in handling different datatypes when including conditions in...

Restricting Rows And Sorting Data

Discuss the differences in handling different datatypes when including conditions in a query.

Oracle 12c: SQL

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer)

In the SQL there are many types of datatypes and each one's handling is different when including conditions in a query as:

CHARACTER [(length)] or CHAR [(length)] - Use using single quotes in the char as for example: select * from tablename where attributename='John';

VARCHAR (length) - Use using single quotes in the char as for example: select * from tablename where attributename='John'; where attributename is of varchar type and we are comparing a value with it.

BOOLEAN - No use of any quotes and can simple compare with Boolean values as true or false. SELECT * FROM tablename WHERE attributename = false; attributename is of BOOLEAN type

SMALLINT - No quotes or anything to be used. Can simply compare numbers using operators such as < , < , = etc.

SELECT * FROM tablename WHERE attributename = 2; attributename is of SMALLINT type

INTEGER or INT - No quotes or anything to be used. Can simply compare numbers using operators such as < , > , = etc.

SELECT * FROM tablename WHERE attributename = 2;

attributename is of INTEGER type

FLOAT(p) - matching a float column is as simple as just placing the float value like: SELECT * FROM tablename WHERE attributename = 2.3;

DATE - matching a date using just the date in single braces as:

SELECT * FROM tablename WHERE attributename >= '20081220 00:00:00.000';

This depends on the date format.

Add a comment
Know the answer?
Add Answer to:
Restricting Rows And Sorting Data Discuss the differences in handling different datatypes when including conditions in...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • When reading text, you concentrate on the words rather than the punctuation. Computers; however, focus on...

    When reading text, you concentrate on the words rather than the punctuation. Computers; however, focus on punctuation before the actual words. Any mistake in punctuation can confuse the computer. More than half of the errors most people make while learning SQL are due to errors in punctuation. What makes this concept even more difficult is that punctuation has additional meaning in SQL that it does not have in the English language. Instructions Prepare your responses and items for Part A...

  • In about one page, discuss two critical value differences that frequently affect ethical behaviors when working...

    In about one page, discuss two critical value differences that frequently affect ethical behaviors when working in different cultures (Hint: Define critical values and ethical behaviors- citations here, discuss how values affect behavior, and answer the rest of the questions, including examples.)

  • 1. According to the paper, what does lactate dehydrogenase (LDH) do and what does it allow...

    1. According to the paper, what does lactate dehydrogenase (LDH) do and what does it allow to happen within the myofiber? (5 points) 2. According to the paper, what is the major disadvantage of relying on glycolysis during high-intensity exercise? (5 points) 3. Using Figure 1 in the paper, briefly describe the different sources of ATP production at 50% versus 90% AND explain whether you believe this depiction of ATP production applies to a Type IIX myofiber in a human....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT