|
-
Nov 22nd, 2007, 03:09 AM
#1
Thread Starter
Addicted Member
Is this right sql query???
hello masters
Please chek this statment...
select * from stud_data,old_dont_use where [Sr No]=11 and old_dont_use.[Sr No]=stud_data.[Sr No]
i think it is not valid statment.
there are two tables stud_data and old_dont_use
stud_data is master table and i want data from old.... as per sr no in stud_data
so if it any change in it then please do it
thnk you very muchh in advance
-
Nov 22nd, 2007, 03:31 AM
#2
Re: Is this right sql query???
Code:
"SELECT stud_data.*, old_dont_use.* " & _
"FROM stud_data INNER JOIN old_dont_use ON stud_data.[SR No] = old_dont_use.[SR No] " & _
"WHERE stud_data.[SR No] = 11;"
You might find the SQL tutorial in my sig useful
-
Nov 22nd, 2007, 04:50 AM
#3
Hyperactive Member
Re: Is this right sql query???
 Originally Posted by MaximilianMayrhofer
Code:
"SELECT stud_data.*, old_dont_use.* " & _
"FROM stud_data INNER JOIN old_dont_use ON stud_data.[SR No] = old_dont_use.[SR No] " & _
"WHERE stud_data.[SR No] = 11;"
You might find the SQL tutorial in my sig useful 
Beware of SQL injection
-
Nov 22nd, 2007, 05:56 AM
#4
Re: Is this right sql query???
-
Nov 22nd, 2007, 06:10 AM
#5
Re: Is this right sql query???
In line SQL is open to outside hacking where database names, table names field names, etc can be obtained.
Once obtained, it is not beyond the realm of possibility that malicious actions can be taken against your database.
This is referred to as "Injection"
To avoid possible SQL Injections, you should always use parametized queries or Stored Procedures.
Having said that, however, I would be willing to bet that the overwhelming majority of development done throughout the world still uses in line SQL.
-
Nov 22nd, 2007, 07:27 AM
#6
Re: Is this right sql query???
Note this Link
I want to quote one passage:
 Originally Posted by Wikipedia
It is in fact an instance of a more general class of vulnerabilities that can occur whenever one programming or scripting language is embedded inside another.
Such as In-Line SQL
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|