Комментарии:
Anyone facing issue in INSERT value query, below is updated query:
👉Customer Table
🔖Create table
CREATE TABLE customer
(
CustID int PRIMARY KEY,
CustName varchar(50) NOT NULL,
Age int NOT NULL,
City char(50),
Salary numeric );
🔖Insert values in table
INSERT INTO customer (CustID, CustName, Age, City, Salary)
VALUES
(1, 'sam', 26, 'Delhi', 9008),
(2, 'Ram', 19, 'Bangalore', 11000),
(3, 'Pam', 31, 'Mumbai', 6060),
(4, 'Sam', 42, 'Pune', 10000);
🔖Update values in table
UPDATE customer
SET CustName = 'Xam' , Age = 32
WHERE CustID = 4
ERROR: column "custid" of relation "customer" does not exist
LINE 2: (CustID, CustName, AGE, CITY, SALARY)
^
SQL state: 42703
Character: 23
INSERT INTO public.customer
(CustID, CustName, Age, City, Salary)
VALUES
(1, 'Sam', 26, 'Delhi', 9000),
(2, 'Ram', 19, 'Banglore', 110000),
(3, 'Pam', 32, 'Mumbai', 6000),
(4, 'Jam', 42, 'Pune', 10000);
ERROR: column "custid" of relation "customer" does not exist
LINE 2: (CustID, CustName, Age, City, Salary)
^
SQL state: 42703
Character: 30
ERROR: column "custid" of relation "customer" does not exist
LINE 2: (CustID, CustName, Age, City, Salary)
^
SQL state: 42703
Character: 23
I edit database with db browser and used on app . I thinks that is not working because data is not extracting . Is there chance of error or i am just thinking .
ОтветитьIf anyone is having trouble in finding the table and getting error as table not found then you can use the following statement as
INSERT INTO public."Table_name"
(column_1, column_2....,column_n)
VALUES
(value1, value2, value3);
note : - use public."table_name" for every sql query to mark the table in which you are implementing the query.
Getting error again and again while using
ALTER TABLE "Customer"
ALTER COLUMN "Email" char(10);
Its wrong for adding column- alter table table_name add column_name
For drop - alter table table_name drop column columm_name
For modify columnsyntax - alter table_name modify columnname
How to update values from different row and different column in a single query
ОтветитьHello Rishabh Sir, when im inserting values why does it show error when im putting them in double quotes while its working fine with single quotes??
ОтветитьSir table space kese badate hai?
ОтветитьThe way you replied to 95% of all comments is really appreciable..❤️❤️.
ОтветитьHELLO SIR, THE ISSUE I AM FACING IS ABOUT THE SYNTAX YOU ARE USING AND WHAT MY POSTGRE SQL IS ACCEPTING IS DIFFERENT IDK WHY.
FOR EG. i have to use double quotes for representing my column names instead you are not using it............
another syntax problem is when i am using ALTER COLUMN. i have to use TYPE command with it to work perfectly.
kindly check this.
pls make videos on database also good explanation
Ответить@RishabhMishraOfficial DATA TYPE alter me syntax error aarha hai : ALTER TABLE customer ALTER COLUMN city VARCHAR(50) {from char(50) to varchar(50)}
ОтветитьWhen you use alter table for add column than you define the data type also in this slide that is not written so that you may got error
ОтветитьHi Rishabh, i understood the delete command, how do we write command if we have to delete multiple rows?
ОтветитьYeah I have doubt about alter table modify I can't able to change the data type in existing table
ОтветитьBest videos for sql 🫡🫡🫡
ОтветитьIf by mistake we did not mention charecters how to edit that?
ОтветитьWhat is the different between DELETE FROM table_name and TRUNCATE TABLE table_name?
ОтветитьWorthfull video
Thanks
Insert value m problem aari
ОтветитьI cannot run alter column command.
It keeps showing error.
I m getting error in update
ОтветитьVery helpful content
ОтветитьColumn I'd relation doest not exist aa rha hai kaise resolve karu
ОтветитьMujhe alter column krne m error aa rha h
ОтветитьAfter using the Alter/drop column, I am unable to add values in the new column which is created using the Alter/ add column. I put 1,1 single values using an update command in the table, how to do it in one go?
Ответитьthere is no info about how to update records in a new column after adding in a exesting table???????
ОтветитьSir , Data type change karne ka syntax me error aa raha he?
Ответитьtable m value insert krne k lye new table bana padegi kya sir...
Ответить❤
ОтветитьI have Questions i have created new colums name as City in Table, Now I put that City Column Next name how will I do it.
ОтветитьHi Rishab, I am facing an error: column "age " Of relation "customer" Does not exist
Line 2: (custid, custname, age salary)
SQL state: 42307
Character: 37 please clarify this as I am unable to insert values in tables
Bhai INSERT INTO Customer
(CusID, Name)
VALUES
(12, 'Sajal');
maine yan command run ki hai but i got a error
error was:- ERROR: column "cusid" of relation "customer" does not exist
LINE 2: (CusID, Name)
^
SQL state: 42703
Character: 23
please bhai batao kiya hai mujhe smj nh aa rh
Not able to run ALTER TABLE command can you please help me with this.
ОтветитьAlter table customer
ALTER COLUMN "CustName" varchar;
I have written this in query. I was trying to alter the column datatype from char to varchar but its not working. Can you help me in that. Although it's not required but i was experimenting with ALTER column. It's showing..
ERROR: syntax error at or near "table"
LINE 2: Alter table customer
^
SQL state: 42601
Character: 3
My error showing
Column "age" of relation " customer" does not exist...and AGE column is already in table
Sir ek question hai , is column field name is case sensitive while writing query ya as it is same style mai column field likhna hoga
ОтветитьSir I am facing a problem. When I am excuted error message appears
Error: column "custid" of relation "customer " does not exist
sir why Alter table statement showing error ?
ALTER TABLE customer1
ADD COLUMN place
;
_____________________________________________________________
ERROR: syntax error at or near ";"
LINE 3: ;
^
SQL state: 42601
Character: 41
show error in command but i also copy your also show error i am not understand how can fix this error plz help
Ответитьthanks brother :)
ОтветитьRishabh I am facing issues while using ALTER COLUMN could you please help me out for the correct syntax
ОтветитьMy table name is correct which is 'Customer' but still it is showing does not exist
ОтветитьERROR: syntax error at or near ")"
LINE 4: (1, 'Mahesh', 'Ambawadi', 2%),
^ I got this error while trying to insert data.