0

What are main queries of sql

15th Apr 2017, 11:06 AM
Mohib Ali Mughal
Mohib Ali Mughal - avatar
3 odpowiedzi
+ 1
do you mean main commands? SELECT * FROM TableName WHERE Col1='OldValue' UPDATE TableName SET Col1='Val1', Col2='Val2' WHERE Col1='OldValue' INSERT INTO TableName (Col1,Col2) VALUES ('Val1','Val2') DELETE FROM TableName WHERE Col1='OlDValue'
15th Apr 2017, 11:19 AM
Lorenzo Babbini
Lorenzo Babbini - avatar
0
It depends. While taking the course databases I had to make a lot of sql queries. I think the most frequently used queries are just the simplest ones (if you are making a simple website, and there is no need for complex efficient queries). Some exemples: SELECT * FROM sometable WHERE condition SELECT someattribute FROM table WHERE attribute > ALL ( subquery ) SELECT someattribute FROM table1, ( subquery) table2 WHERE condition SELECT someattribute FROM table1 JOIN table2 (some kind of join) ...
15th Apr 2017, 11:23 AM
EagleEye
EagleEye - avatar
0
I agree with Enes. The main SQL query would be as follows: Select * From <table name> Where <condition>;
16th Apr 2017, 3:53 AM
Donald Malewitz
Donald Malewitz - avatar