0
What are main queries of sql
3 Respostas
+ 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'
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)
...
0
I agree with Enes.
The main SQL query would be as follows:
Select *
From <table name>
Where <condition>;