How to type a new line character in SQL Server Management Studio

You can’t. (Edit: other good answers have been posted with some workable methods.) My preferred method to do this is via a direct SQL update. Two general techniques: –Literal returns inside strings UPDATE mytable SET textvalue=”This text can include line breaks” WHERE rowid = 1234 –Concatenating CHAR codes UPDATE mytable SET textvalue=”This text” + CHAR(10) … Read more

how to print database diagram sql

On SQL Server Management Studio In the Database Diagram, right click and select ‘View Page Breaks’ Then from main window menu select, File > Page Setup Select Page Size and Orientation – A3 and Landscape are most likely best options. And Print Scale – this is the % value that should hopefully enable you to … Read more

Is there any way to view whitespace in the query editor for SQL Server Management Studio Express 2005?

In case you still need to know how to do this. Edit the Registry Key in HKEY_CURRENT_USER: Software\Microsoft\Microsoft SQL Server\xx\Tools\Shell\Text Editor\Visible Whitespace Where xx is the version you have (90 is 2005, 100 is 2008) And set it to 1 to show. Or for SQL Server 2012 and up client tools it is also in … Read more

What is the purpose of .edmx files?

EDMX is Visual Studio’s “container” for all things about your Entity Data Model. It contains all the information that is in the CSDL, SSDL, MSL, plus information about the visual layout of the tables in your Visual Studio designer surface. The EDMX file is converted into CSDL, SSDL, MSL (typically embedded as resources in your … Read more

SQL Server Management Studio – adding foreign key confusing?

Click the expand symbol next to the table. Right click on the “Keys” folder and select “New Foreign Key.” (Alternatively, you can click the Relationships button on the toolstrip when you have the table open) Click the “…” button on the “Tables and Columns Specifications” row to open the editor. The drop down on the … Read more

SQL Server: Importing database from .mdf?

Open SQL Management Studio Express and log in to the server to which you want to attach the database. In the ‘Object Explorer’ window, right-click on the ‘Databases’ folder and select ‘Attach…’ The ‘Attach Databases’ window will open; inside that window click ‘Add…’ and then navigate to your .MDF file and click ‘OK’. Click ‘OK’ … Read more