SQL statment
-
hi guys i have question in SQL select * from user where id='aaa' and pass='hello'; the problem is who can i make it case sensitive like if in my table AAA exist it's different then aaa how can i select the exacte word Regards, Charbel
-
hi guys i have question in SQL select * from user where id='aaa' and pass='hello'; the problem is who can i make it case sensitive like if in my table AAA exist it's different then aaa how can i select the exacte word Regards, Charbel
hi, First of all if your user table has an identity column PK so you can get the data by The PK. Second here is a function that may come in handy //For small a at the begining
Select * from user Where ASCII( id ) = 97
//for Big a at the beginingSelect * from user Where ASCII (id ) = 65
ASCII Function: Returns the ASCII code value of the leftmost character of a character expression. -
hi guys i have question in SQL select * from user where id='aaa' and pass='hello'; the problem is who can i make it case sensitive like if in my table AAA exist it's different then aaa how can i select the exacte word Regards, Charbel
Cast them to varbinary:
SELECT * FROM user WHERE CAST(id AS VARBINARY(50)) = CAST('aaa' AS VARBINARY(50)) AND CAST(pass AS VARBINARY(50)) = CAST('hello' AS VARBINARY(50))
-
hi guys i have question in SQL select * from user where id='aaa' and pass='hello'; the problem is who can i make it case sensitive like if in my table AAA exist it's different then aaa how can i select the exacte word Regards, Charbel