0
Hello everyone,I have a question concerning sql language,how to add a constant to a column of integers in a table?
7 Réponses
+ 6
do you mean a default value?
+ 6
try this:
(this is an example)
CREATE TABLE person (
id int NOT NULL,
name varchar(255),
age int DEFAULT 18
);
here is a link for more information:
https://www.w3schools.com/sql/sql_default.asp
+ 6
If you want to change all the values in a column use the UPDATE command:
UPDATE table_name
SET column_name = 10;
+ 6
your welcome
+ 1
yes
+ 1
I already created the table and I have a column of integers with different values n I want to add to each of these values 10 how can I do it?
+ 1
thank you a lot Ulisses Cruz