Comp Sci Insert Data Into SQL Table with Number Datatype

  • Thread starter Thread starter Crystal037
  • Start date Start date
Click For Summary
To insert a decimal value like 1.1 into an SQL table, the number datatype must be defined correctly, such as using number(2, 1). This definition specifies that the total number of digits is 2, with 1 digit to the right of the decimal point. Proper datatype configuration is essential for accurate data representation in SQL. For further details on the number data type, refer to Oracle's documentation. Understanding these specifications ensures successful data insertion into SQL tables.
Crystal037
Messages
167
Reaction score
7
Homework Statement
I can't understand what is meant by precision and scale while declaring a variable as number datatype in SQL Oracle. I have created a table example and specified attr1 as number(1,1) datatype. According to my understanding it can take one digit before decimal and 1 digit after decimal.But if I'm trying to insert values like 1.1 it's showing value larger than specified precision allowed for this column. Can u explain if my understanding of precision is correct.
Relevant Equations
create table example(
attr1 number(1,1));
insert into example values(1.1);
Screenshot (128).png
 
Last edited by a moderator:
Physics news on Phys.org
Mark44 said:
The image is too small to be legible.
Referring image isn't necessary I've written the query in relevant equations part
 
Thread 'How do I determine the resistance for RLC low pass filter?'
Hi, I am trying to build a RLC low pass filter that atenuates the frequency below 4500 Hz. However, I have encountered some problem when choosing the correct R to work with. Here is the Circuit Here is the original sound. Here is my code in Matlab function Vout = myFilterCircuit(Vin,h) n_V = length(Vin); f_7 = 4470;; % Undesired frequency h_7 = h; % delta time % These are for the constant and initialization of the variables t_7 = 0:h_7:(n_V-1)*h_7; % This is the independent variable...
Thread 'Have I solved this structural engineering equation correctly?'
Hi all, I have a structural engineering book from 1979. I am trying to follow it as best as I can. I have come to a formula that calculates the rotations in radians at the rigid joint that requires an iterative procedure. This equation comes in the form of: $$ x_i = \frac {Q_ih_i + Q_{i+1}h_{i+1}}{4K} + \frac {C}{K}x_{i-1} + \frac {C}{K}x_{i+1} $$ Where: ## Q ## is the horizontal storey shear ## h ## is the storey height ## K = (6G_i + C_i + C_{i+1}) ## ## G = \frac {I_g}{h} ## ## C...

Similar threads

Replies
17
Views
3K
Replies
5
Views
1K
Replies
1
Views
2K
Replies
8
Views
984
Replies
10
Views
2K
Replies
8
Views
2K
Back
Top