I created a database using the command
CREATE TABLE login_table2(user_name VARCHAR(32), first_name VARCHAR(32),
last_name VARCHAR(32), password VARCHAR(64));
then i inserted a data using command
INSERT INTO login_table2(user_name ,first_name , last_name , password )
VALUES('ramya', 'ramya', 'muthu', 'India');
the data got inserted into the table. then i inserted another set of data using command
INSERT INTO login_table2(user_name ,first_name , last_name , password )
VALUES('jeyshree', 'jey', 'shree', 'India');
the data got inserted into the table too. then i gave the command
SELECT first_name FROM login_table2;
the command displayed all the first_ name in the table. however when i gave the command
SELECT password FROM login_table2 WHERE user_name = 'ramya';
it does not fetch anything though the entry exist in the table.mention where i am going wrong.awaiting your reply.
try using
SELECT databasename.first_name FROM login_table2;
or using all
SELECT * FROM login_table2;
the [ * ] should works
0 comments:
Post a Comment