dear sirs i am using sql server 2000 enterprise edition, i am new to sql server and also am learning the sql language...
I have a table named spt_datatype_info
that table has a column called TYPE_NAME
I have given a WHERE statement in a query:
WHERE (TYPE_NAME = smallint)
i know actually the value smallint has to be given in quotes...
Now my question is: When i give the Verify SQL syntax
then it does not return any error, but when i run it...then it given the following error...
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'smallint'.
what does this mean...??
If the SQL statement is wrong then it should return an error when verifying the statement...
the intersection of row and column is called "the value of column Y for row X"
i realize that sounds somewhat flippant, but relational database theory is based upon primary keys, so "row X" means "the row where the primary key value is X" since that's how you tell rows apart, and "column Y" means "the column with 'Y' as the column name" since that's how you tell columns apart
dear sir, i have started using the SQL query Analyzer, i have another question,
i just put in the LIKE condition...
SELECT * FROM spt_datatype_info WHERE TYPE_NAME LIKE '%s'
now this will give all the values in the TYPE_NAME column which start with any characters but end with 's' , thats why i have put '%s' , now suppose i want all the values that have 2 letters as starting and the 3rd letter as 's' , so what do symbol do i use??
Like in windows when we used to give in command prompt the ! , exclamation mark for the characters we did not know but were sure of the count of them, and the star '*' for the characters we did not know and were not sure of their count..
Similarly in SQL what would we give for the LIKE condition..??