Is it possible to define in which schema new tables get created by default? (Referred by "unqualified table names".) I've seen some details about using the "search path" in Postgres, but I think it o...
I have a table: table votes ( id, user, email, address, primary key(id), ); Now I want to make the columns user, email, address unique (together). How do I do this in MySql? ...
Is it possible to search every field of every table for a particular value in Oracle? There are hundreds of tables with thousands of rows in some tables so I know this could take a very long time to ...
Using Postgres, I'm trying to use AUTO_INCREMENT to number my primary key automatically in SQL. However, it gives me an error. CREATE TABLE Staff ( ID INTEGER NOT NULL AUTO_INCREMENT, Na...
What is the best way to get the names of all of the tables in a specific database on SQL Server?
I need a table variable to store the particular rows from the table within the MySQL procedure. E.g. declare @tb table (id int,name varchar(200)) Is this possible? If yes how?
I have a database called foo and a database called bar. I have a table in foo called tblFoobar that I want to move (data and all) to database bar from database foo. What is the SQL statement to do thi...
What is the best/fastest way to upload a csv file into a mysql table? I would like for the first row of data be used as the column names. Found this: How to import CSV file to MySQL table But the ...
I regularly need to delete all the data from my PostgreSQL database before a rebuild. How would I do this directly in SQL? At the moment I've managed to come up with a SQL statement that returns all ...
I've got a MySQL table with a bunch of entries in it, and a column called "Multiplier." The default (and most common) value for this column is 0, but it could be any number. What I need to do is sele...