SQL statements?? If the database contains a table called 'users' and you wanted to get the 'password' attribute(column) of one particular record(row) and the uid was a key field...which of the following SQL statements could to this: A, SELECT password FROM users WHERE uid='snooki@jerseyshore.com' B. UPDATE users SET password='gymtanlaundry' WHERE uid='snooki@jerseyshore.com' C. select users FROM passwords WHERE uid='snooki@jerseyshore.com' D. INSERT into users (password) VALUES('guytanlaundry')
Please explain. I don't even know where to start with this one (I missed a day of class and a similar question will be on final)
ans is A
u need to grab the password field so need to SELECT password than need to chose the table where this lies and it is done by using from <table name> and then the condition for selecting a particular row and that is specified by where and the value of the column name as mentioned in the option,
Join our real-time social learning platform and learn together with your friends!