update column with random string

DECLARE @v TABLE (x VARCHAR(50)) INSERT INTO @v VALUES — list of strings that column will be updated with (’37845840’),(’34879335’),(’33879336’),(’37855840’);   DECLARE cursor1 CURSOR FOR SELECT <TABLE_ID> FROM <SOME_TABLE>; DECLARE @id INT;   OPEN cursor1 FETCH NEXT FROM cursor1 INTO @id   WHILE @@FETCH_STATUS=0 BEGIN UPDATE <SOME_TABLE> SET <UPDATED_COLUMN> = ( SELECT x FROM ( Read more about update column with random string[…]

SQLCMD.exe

# query in command line sqlcmd -d db_name -Q ‘select * from table_name’ -W   # connnect by hostname and port number (1433) sqlcmd -S tcp:hostname,1433 -U username -P password   # connnect by hostname and port number (1433) and use db (dbname) sqlcmd -S tcp:hostname,1433 -U username -P password -d dbname   # input Read more about SQLCMD.exe[…]

SQL Server: Numer portu

Wykonanie poniższego zapytania powinno zwrócić numery portów, na których nasłuchuje SQL Server. USE master GO xp_readerrorlog 0, 1, N’Server is listening on’, ‘any’, NULL, NULL, N’asc’ GOUSE master GO xp_readerrorlog 0, 1, N’Server is listening on’, ‘any’, NULL, NULL, N’asc’ GO