How to export a mysql database using Command Prompt?

First check if your command line recognizes mysql command. If not go to command & type in: Then use this command to export your database: You will then be prompted for the database password. This exports the database to the path you are currently in, while executing this command Note: Here are some detailed instructions regarding both import … Read more

Add a column with a default value to an existing table in SQL Server

Syntax: Example: Notes: Optional Constraint Name:If you leave out CONSTRAINT D_SomeTable_SomeCol then SQL Server will autogenerate    a Default-Contraint with a funny Name like: DF__SomeTa__SomeC__4FB7FEF6 Optional With-Values Statement:The WITH VALUES is only needed when your Column is Nullable    and you want the Default Value used for Existing Records.If your Column is NOT NULL, then it will automatically use the Default … Read more

grabbing first row in a mysql query only

To return only one row use LIMIT 1: It doesn’t make sense to say ‘first row’ or ‘last row’ unless you have an ORDER BY clause. Assuming you add an ORDER BY clause then you can use LIMIT in the following ways: To get the first row use LIMIT 1. To get the 2nd row you can use limit with an … Read more