PostgreSQL 8.0 Documentationby zero in a WHERE clause: SELECT ... WHERE x < > 0 AND y/x > 1.5; But this is safe: SELECT ... WHERE CASE WHEN x < > 0 THEN y/x > 1.5 ELSE false END; A CASE construct used in this fashion will defeat necessary. (In this particular example, it would doubtless be best to sidestep the problem by writing y > 1.5*x instead.) 39 Chapter 5. Data Definition This chapter covers how one creates the database structures interval ’1 hour’ * double precision ’3.5’ interval ’03:30’ / interval ’1 hour’ / double precision ’1.5’ interval ’00:40’ Table 9-26. Date/Time Functions Function Return Type Description Example Result0 码力 | 1422 页 | 9.92 MB | 1 年前3
PostgreSQL 8.0 Documentationby zero in a WHERE clause: SELECT ... WHERE x < > 0 AND y/x > 1.5; But this is safe: SELECT ... WHERE CASE WHEN x < > 0 THEN y/x > 1.5 ELSE false END; A CASE construct used in this fashion will defeat necessary. (In this particular example, it would doubtless be best to sidestep the problem by writing y > 1.5*x instead.) 37 Chapter 5. Data Definition This chapter covers how one creates the database structures interval ’1 hour’ * double precision ’3.5’ interval ’03:30’ / interval ’1 hour’ / double precision ’1.5’ interval ’00:40’ Table 9-26. Date/Time Functions Function Return Type Description Example Result0 码力 | 1332 页 | 9.76 MB | 1 年前3
PostgreSQL 8.1.11 Documentationby zero in a WHERE clause: SELECT ... WHERE x < > 0 AND y/x > 1.5; But this is safe: SELECT ... WHERE CASE WHEN x < > 0 THEN y/x > 1.5 ELSE false END; A CASE construct used in this fashion will defeat necessary. (In this particular example, it would doubtless be best to sidestep the problem by writing y > 1.5*x instead.) 39 Chapter 5. Data Definition This chapter covers how one creates the database structures precision ’3.5’ * interval ’1 hour’ interval ’03:30:00’ / interval ’1 hour’ / double precision ’1.5’ interval ’00:40:00’ 164 Chapter 9. Functions and Operators Table 9-26. Date/Time Functions Function0 码力 | 1582 页 | 12.19 MB | 1 年前3
PostgreSQL 8.1 Documentationby zero in a WHERE clause: SELECT ... WHERE x < > 0 AND y/x > 1.5; But this is safe: SELECT ... WHERE CASE WHEN x < > 0 THEN y/x > 1.5 ELSE false END; A CASE construct used in this fashion will defeat necessary. (In this particular example, it would doubtless be best to sidestep the problem by writing y > 1.5*x instead.) 39 Chapter 5. Data Definition This chapter covers how one creates the database structures interval ’1 hour’ * double precision ’3.5’ interval ’03:30’ / interval ’1 hour’ / double precision ’1.5’ interval ’00:40’ Table 9-26. Date/Time Functions Function Return Type Description Example Result0 码力 | 1548 页 | 11.54 MB | 1 年前3
PostgreSQL 8.2 Documentationby zero in a WHERE clause: SELECT ... WHERE x < > 0 AND y/x > 1.5; But this is safe: SELECT ... WHERE CASE WHEN x < > 0 THEN y/x > 1.5 ELSE false END; A CASE construct used in this fashion will defeat necessary. (In this particular example, it would doubtless be best to sidestep the problem by writing y > 1.5*x instead.) 40 Chapter 5. Data Definition This chapter covers how one creates the database structures precision ’3.5’ * interval ’1 hour’ interval ’03:30:00’ / interval ’1 hour’ / double precision ’1.5’ interval ’00:40:00’ Table 9-26. Date/Time Functions Function Return Type Description Example Result0 码力 | 1748 页 | 13.12 MB | 1 年前3
PostgreSQL 8.2 Documentationby zero in a WHERE clause: SELECT ... WHERE x < > 0 AND y/x > 1.5; But this is safe: SELECT ... WHERE CASE WHEN x < > 0 THEN y/x > 1.5 ELSE false END; A CASE construct used in this fashion will defeat necessary. (In this particular example, it would doubtless be best to sidestep the problem by writing y > 1.5*x instead.) 40 Chapter 5. Data Definition This chapter covers how one creates the database structures precision ’3.5’ * interval ’1 hour’ interval ’03:30:00’ / interval ’1 hour’ / double precision ’1.5’ interval ’00:40:00’ Table 9-26. Date/Time Functions Function Return Type Description Example Result0 码力 | 1762 页 | 5.43 MB | 1 年前3
PostgreSQL 14.10 Documentationdivision by zero in a WHERE clause: SELECT ... WHERE x > 0 AND y/x > 1.5; But this is safe: SELECT ... WHERE CASE WHEN x > 0 THEN y/x > 1.5 ELSE false END; A CASE construct used in this fashion will defeat necessary. (In this particular example, it would be better to sidestep the problem by writing y > 1.5*x instead.) CASE is not a cure-all for such issues, however. One limitation of the technique illustrated -4 | -4 -2.5 | -3 | -2 -1.5 | -2 | -2 -0.5 | -1 | -0 0.5 | 1 | 0 1.5 | 2 | 2 2.5 | 3 | 20 码力 | 3032 页 | 13.27 MB | 1 年前3
PostgreSQL 14.10 DocumentationWHERE clause: 54 SQL Syntax SELECT ... WHERE x > 0 AND y/x > 1.5; But this is safe: SELECT ... WHERE CASE WHEN x > 0 THEN y/x > 1.5 ELSE false END; A CASE construct used in this fashion will defeat necessary. (In this particular example, it would be better to sidestep the problem by writing y > 1.5*x instead.) CASE is not a cure-all for such issues, however. One limitation of the technique illustrated -4 | -4 -2.5 | -3 | -2 -1.5 | -2 | -2 -0.5 | -1 | -0 0.5 | 1 | 0 1.5 | 2 | 2 2.5 | 3 | 20 码力 | 2871 页 | 13.38 MB | 1 年前3
PostgreSQL 13.13 Documentationdivision by zero in a WHERE clause: SELECT ... WHERE x > 0 AND y/x > 1.5; But this is safe: SELECT ... WHERE CASE WHEN x > 0 THEN y/x > 1.5 ELSE false END; A CASE construct used in this fashion will defeat necessary. (In this particular example, it would be better to sidestep the problem by writing y > 1.5*x instead.) CASE is not a cure-all for such issues, however. One limitation of the technique illustrated | -4 -2.5 | -3 | -2 -1.5 | -2 | -2 -0.5 | -1 | -0 0.5 | 1 | 0 142 Data Types 1.5 | 2 | 2 2.5 | 3 |0 码力 | 2782 页 | 13.00 MB | 1 年前3
PostgreSQL 13.14 Documentationdivision by zero in a WHERE clause: SELECT ... WHERE x > 0 AND y/x > 1.5; But this is safe: SELECT ... WHERE CASE WHEN x > 0 THEN y/x > 1.5 ELSE false END; A CASE construct used in this fashion will defeat necessary. (In this particular example, it would be better to sidestep the problem by writing y > 1.5*x instead.) CASE is not a cure-all for such issues, however. One limitation of the technique illustrated -4 | -4 -2.5 | -3 | -2 -1.5 | -2 | -2 -0.5 | -1 | -0 0.5 | 1 | 0 1.5 | 2 | 2 2.5 | 3 | 20 码力 | 2940 页 | 12.89 MB | 1 年前3
共 40 条
- 1
- 2
- 3
- 4













