nomore_sr
-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by nomore_sr
-
-
Hope this useful. I tried and it workedI have two Table : Student include field : ID ,NAme,classs an a Table :Point include ID ,Point, name,class . I want when Update a table ,exemple : Student then The table Point so-so updated!Please help meCreate trigger St_update on Studentfor updateAs update Point set [iD]=(select [iD] from Inserted), [Name]=(select [Name] rom Inserted), Class=(select Class from Inserted) where [iD]=(select [iD] from Deleted)
Your Student table should have primary key. In this case I chose ID as primary key
-
this's useful. Thank youAnother way to select the first 8 rowsWell, the first step is to select which fields you want (or use * for all of them). Your sql so far is:SELECT field1, field2,etc FROM table_nameORSELECT * FROM table_nameThen you have to make sure it is sorted correctly by using the order by command and then ASC or DESC for ascending or descending. As you want most recent first I think you should try DESC:SELECT * FROM table_name ORDER BY date_field DESCThen you want to limit the results to the first 8 rows so the LIMIT keyword seems a good one to use:SELECT * FROM table_name ORDER BY date_field DESC LIMIT 0,7This returns all rows between 0 and 7 (ie 8 rows). Don't forget that your first row is 0 (not 1).SELECT top 8 * FROM table_name ORDER BY date_field DESC
-
This is my solution
sp_rename 'TableName','NewName'
-
Other ppl won't see the password if method="post" like thisits work..thank you so much...now i'm gonna encrypt it...so that other ppl won't see the password...<form id="login" action="" method="post" onsubmit="LogIn(); return false;">
default method is post
sum
in SQL
Posted
will return 0 if there are no records and sum if sum is not null